home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / mail / elm / elm2.4.p24c.Z / elm2.4.p24c
Encoding:
Text File  |  1994-09-23  |  70.0 KB  |  2,402 lines

  1. Subject: elm 2.4 Patch #24c
  2. Date: Fri Sep 23 21:43:13 EDT 1994
  3. Summary: This is an official patch for elm 2.4 system.  Please apply it.
  4. Priority: LOW
  5.  
  6. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  7.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  8.     If you don't have the patch program, apply the following by hand,
  9.     or get patch (version 2.0, latest patchlevel).
  10.  
  11.     After patching:
  12.         rm -f utils/arepdaem* utils/autoreply* hdrs/s_autoreply.h
  13.         rm -f nls/C/C/C/s_arepdaem.m nls/C/C/C/s_autoreply.m
  14.         sh Configure -d
  15.         make
  16.         make install
  17.  
  18.     If patch indicates that patchlevel is the wrong version, you may need
  19.     to apply one or more previous patches, or the patch may already
  20.     have been applied.  See the patchlevel.h file to find out what has or
  21.     has not been applied.  In any event, don't continue with the patch.
  22.  
  23.     If you are missing previous patches they can be obtained from our:
  24.     archive server.
  25.  
  26.     Syd Weinstein
  27.     elm@Myxa.com
  28.  
  29.     The patches are available from the dsinc archive server
  30.     Send the following message to archive-server@Myxa.com for
  31.     a list of available patches:
  32.  
  33.     Subject: patch list
  34.     send index elm
  35.  
  36. Index: src/help.c
  37. Prereq: 5.4
  38. *** ../elm2.4/src/help.c    Sun Sep 26 22:14:59 1993
  39. --- src/help.c    Mon May 30 12:42:49 1994
  40. ***************
  41. *** 1,8 ****
  42.   
  43. ! static char rcsid[] = "@(#)$Id: help.c,v 5.4 1993/08/03 19:28:39 syd Exp $";
  44.   
  45.   /*******************************************************************************
  46. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  47.    *
  48.    *            Copyright (c) 1988-1992 USENET Community Trust
  49.    *            Copyright (c) 1986,1987 Dave Taylor
  50. --- 1,8 ----
  51.   
  52. ! static char rcsid[] = "@(#)$Id: help.c,v 5.6 1994/05/30 16:42:48 syd Exp $";
  53.   
  54.   /*******************************************************************************
  55. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  56.    *
  57.    *            Copyright (c) 1988-1992 USENET Community Trust
  58.    *            Copyright (c) 1986,1987 Dave Taylor
  59. ***************
  60. *** 14,19 ****
  61. --- 14,27 ----
  62.    *
  63.    *******************************************************************************
  64.    * $Log: help.c,v $
  65. +  * Revision 5.6  1994/05/30  16:42:48  syd
  66. +  * Just a minor fix to an impossible character comparison.
  67. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  68. +  *
  69. +  * Revision 5.5  1994/03/11  21:25:24  syd
  70. +  * Fix Elm looping if an EOF is received.
  71. +  * From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  72. +  *
  73.    * Revision 5.4  1993/08/03  19:28:39  syd
  74.    * Elm tries to replace the system toupper() and tolower() on current
  75.    * BSD systems, which is unnecessary.  Even worse, the replacements
  76. ***************
  77. *** 58,64 ****
  78.           if pager_help is FALSE (index screen)
  79.        **/
  80.   
  81. !     char ch;        /* character buffer for input */
  82.       char *s;        /* string pointer...          */
  83.       int prompt_line, info_line;
  84.       static char *help_message = NULL;
  85. --- 66,72 ----
  86.           if pager_help is FALSE (index screen)
  87.        **/
  88.   
  89. !     int  ch;        /* character buffer for input */
  90.       char *s;        /* string pointer...          */
  91.       int prompt_line, info_line;
  92.       static char *help_message = NULL;
  93. ***************
  94. *** 331,336 ****
  95. --- 339,347 ----
  96.                   s = catgets(elm_msg_cat, ElmSet, ElmHelpExitQuickly,
  97.                       "Exit the mail system quickly.");
  98.                  break;
  99. +         case EOF: leave(0);
  100. +                       break;
  101.   
  102.           default : if (isdigit(ch) && !pager_help) 
  103.                   s = catgets(elm_msg_cat, ElmSet, ElmHelpMakeMessageCurrent,
  104.  
  105. Index: src/in_utils.c
  106. Prereq: 5.13
  107. *** ../elm2.4/src/in_utils.c    Sun Sep 26 22:15:00 1993
  108. --- src/in_utils.c    Thu Sep  1 15:42:41 1994
  109. ***************
  110. *** 1,8 ****
  111.   
  112. ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.13 1993/08/03 19:28:39 syd Exp $";
  113.   
  114.   /*******************************************************************************
  115. !  *  The Elm Mail System  -  $Revision: 5.13 $   $State: Exp $
  116.    *
  117.    *            Copyright (c) 1988-1992 USENET Community Trust
  118.    *            Copyright (c) 1986,1987 Dave Taylor
  119. --- 1,8 ----
  120.   
  121. ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.16 1994/09/01 19:42:39 syd Exp $";
  122.   
  123.   /*******************************************************************************
  124. !  *  The Elm Mail System  -  $Revision: 5.16 $   $State: Exp $
  125.    *
  126.    *            Copyright (c) 1988-1992 USENET Community Trust
  127.    *            Copyright (c) 1986,1987 Dave Taylor
  128. ***************
  129. *** 14,19 ****
  130. --- 14,33 ----
  131.    *
  132.    *******************************************************************************
  133.    * $Log: in_utils.c,v $
  134. +  * Revision 5.16  1994/09/01  19:42:39  syd
  135. +  * Moved #defines for SETJMP & LONGJMP from src/editmsg.c to hdrs/defs.h and
  136. +  * used them instead of (set|long)jmp directly. This makes the usage consistent
  137. +  * and Solaris 2.3 behaves correctly w.r.t stop/continue.
  138. +  * From: Jan.Djarv@sa.erisoft.se (Jan Djarv)
  139. +  *
  140. +  * Revision 5.15  1994/08/30  18:16:05  syd
  141. +  * Fix up Solaris and SVR4 signal handling for timeout
  142. +  * From: Syd
  143. +  *
  144. +  * Revision 5.14  1994/03/11  21:25:24  syd
  145. +  * Fix Elm looping if an EOF is received.
  146. +  * From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  147. +  *
  148.    * Revision 5.13  1993/08/03  19:28:39  syd
  149.    * Elm tries to replace the system toupper() and tolower() on current
  150.    * BSD systems, which is unnecessary.  Even worse, the replacements
  151. ***************
  152. *** 140,149 ****
  153. --- 154,167 ----
  154.       fflush(stdin);
  155.   
  156.       ch = ReadCh();
  157. +     if (ch == EOF)
  158. +       leave(0);
  159.       ch = tolower(ch);
  160.   
  161.       while (!( ch == *def_ans_yes || ch == *def_ans_no || ch == '\n' || ch == '\r')) {
  162.         ch = ReadCh();
  163. +       if (ch == EOF)
  164. +         leave(0);
  165.         ch = tolower(ch);
  166.       }
  167.       if(ch == '\n' || ch == '\r')
  168. ***************
  169. *** 561,571 ****
  170.   GetPrompt()
  171.   {
  172.       /** This routine does a read/timeout for a single character.
  173. !         The way that this is determined is that the routine to
  174.           read a character is called, then the "errno" is checked
  175.           against EINTR (interrupted call).  If they match, this
  176.           returns NO_OP_COMMAND otherwise it returns the normal
  177. !         command.  On BSD systems, the EINTR will never be returned
  178.           so we instead longjmp from the signal handler.
  179.       **/
  180.   
  181. --- 579,589 ----
  182.   GetPrompt()
  183.   {
  184.       /** This routine does a read/timeout for a single character.
  185. !         The way that this was determined is that the routine to
  186.           read a character is called, then the "errno" is checked
  187.           against EINTR (interrupted call).  If they match, this
  188.           returns NO_OP_COMMAND otherwise it returns the normal
  189. !         command.  On many systems, the EINTR will never be returned
  190.           so we instead longjmp from the signal handler.
  191.       **/
  192.   
  193. ***************
  194. *** 573,580 ****
  195.   
  196.       if (timeout > 0) {
  197.         alarm((unsigned) timeout);
  198. ! #ifdef    BSD
  199. !       if (setjmp(GetPromptBuf)) {
  200.           InGetPrompt = 0;
  201.           ch = NO_OP_COMMAND;
  202.           alarm((unsigned) 0);
  203. --- 591,597 ----
  204.   
  205.       if (timeout > 0) {
  206.         alarm((unsigned) timeout);
  207. !       if (SETJMP(GetPromptBuf)) {
  208.           InGetPrompt = 0;
  209.           ch = NO_OP_COMMAND;
  210.           alarm((unsigned) 0);
  211. ***************
  212. *** 587,608 ****
  213.         }
  214.       }
  215.       else {
  216.           ch = ReadCh();
  217.           if (errno == EINTR) ch = NO_OP_COMMAND;
  218.       }
  219. - #else
  220. -         errno = 0;    /* we actually have to do this.  *sigh*  */
  221. -         ch = ReadCh();
  222. -         if (errno == EINTR) ch = NO_OP_COMMAND;
  223. -         alarm((unsigned) 0);
  224. -     }
  225. -     else {
  226. -       errno = 0;
  227. -       ch = ReadCh();
  228. -       if (errno == EINTR) ch = NO_OP_COMMAND;
  229. -     }
  230. - #endif
  231.       return(ch);
  232.   }
  233. --- 604,612 ----
  234.         }
  235.       }
  236.       else {
  237. +         errno = 0;
  238.           ch = ReadCh();
  239.           if (errno == EINTR) ch = NO_OP_COMMAND;
  240.       }
  241.       return(ch);
  242.   }
  243.  
  244. Index: src/init.c
  245. Prereq: 5.19
  246. *** ../elm2.4/src/init.c    Sun Sep 26 22:15:00 1993
  247. --- src/init.c    Mon May 30 12:31:57 1994
  248. ***************
  249. *** 1,8 ****
  250.   
  251. ! static char rcsid[] = "@(#)$Id: init.c,v 5.19 1993/09/27 01:51:38 syd Exp $";
  252.   
  253.   /*******************************************************************************
  254. !  *  The Elm Mail System  -  $Revision: 5.19 $   $State: Exp $
  255.    *
  256.    *            Copyright (c) 1988-1992 USENET Community Trust
  257.    *            Copyright (c) 1986,1987 Dave Taylor
  258. --- 1,8 ----
  259.   
  260. ! static char rcsid[] = "@(#)$Id: init.c,v 5.20 1994/05/30 16:31:40 syd Exp $";
  261.   
  262.   /*******************************************************************************
  263. !  *  The Elm Mail System  -  $Revision: 5.20 $   $State: Exp $
  264.    *
  265.    *            Copyright (c) 1988-1992 USENET Community Trust
  266.    *            Copyright (c) 1986,1987 Dave Taylor
  267. ***************
  268. *** 14,19 ****
  269. --- 14,23 ----
  270.    *
  271.    *******************************************************************************
  272.    * $Log: init.c,v $
  273. +  * Revision 5.20  1994/05/30  16:31:40  syd
  274. +  * make getpwuid dependent on ANSI_C not posix flag
  275. +  * From: Syd
  276. +  *
  277.    * Revision 5.19  1993/09/27  01:51:38  syd
  278.    * Add elm_chown to consolidate for Xenix not allowing -1
  279.    * From: Syd
  280. ***************
  281. *** 159,169 ****
  282.   #ifndef ANSI_C /* items are in unistd.h which is included if __STDC__ */
  283.   char *getlogin();
  284.   unsigned short getgid(), getuid(); 
  285. - #endif
  286. - #ifndef    _POSIX_SOURCE
  287.   struct passwd *getpwuid();
  288.   #endif
  289.   char *get_full_name();
  290.   
  291.   SIGHAND_TYPE
  292. --- 163,171 ----
  293.   #ifndef ANSI_C /* items are in unistd.h which is included if __STDC__ */
  294.   char *getlogin();
  295.   unsigned short getgid(), getuid(); 
  296.   struct passwd *getpwuid();
  297.   #endif
  298.   char *get_full_name();
  299.   
  300.   SIGHAND_TYPE
  301.  
  302. Index: src/leavembox.c
  303. Prereq: 5.20
  304. *** ../elm2.4/src/leavembox.c    Sun Sep 26 22:15:00 1993
  305. --- src/leavembox.c    Fri Jun  3 13:12:44 1994
  306. ***************
  307. *** 1,8 ****
  308.   
  309. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 5.20 1993/09/27 01:51:38 syd Exp $";
  310.   
  311.   /*******************************************************************************
  312. !  *  The Elm Mail System  -  $Revision: 5.20 $   $State: Exp $
  313.    *
  314.    *            Copyright (c) 1988-1992 USENET Community Trust
  315.    *            Copyright (c) 1986,1987 Dave Taylor
  316. --- 1,8 ----
  317.   
  318. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 5.24 1994/06/03 17:05:17 syd Exp $";
  319.   
  320.   /*******************************************************************************
  321. !  *  The Elm Mail System  -  $Revision: 5.24 $   $State: Exp $
  322.    *
  323.    *            Copyright (c) 1988-1992 USENET Community Trust
  324.    *            Copyright (c) 1986,1987 Dave Taylor
  325. ***************
  326. *** 14,19 ****
  327. --- 14,36 ----
  328.    *
  329.    *******************************************************************************
  330.    * $Log: leavembox.c,v $
  331. +  * Revision 5.24  1994/06/03  17:05:17  syd
  332. +  * try and prevent copy from calling elm_chown unless needed
  333. +  * From: Syd
  334. +  *
  335. +  * Revision 5.23  1994/05/14  18:42:57  syd
  336. +  * Here are some more of fixes to correctly call fflush() and unlock() in sequence.
  337. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  338. +  *
  339. +  * Revision 5.22  1994/05/14  17:31:56  syd
  340. +  * try and use copying to remove SVR4 inability to chgrp file
  341. +  * properly
  342. +  *
  343. +  * Revision 5.21  1994/03/12  15:20:01  syd
  344. +  * The latest Linux shared library (4.5.8) "catches" a double fclose()
  345. +  * by generating a SIGSEGV.  :-/
  346. +  * From: fin!chip@dg-rtp.dg.com (Chip Salzenberg)
  347. +  *
  348.    * Revision 5.20  1993/09/27  01:51:38  syd
  349.    * Add elm_chown to consolidate for Xenix not allowing -1
  350.    * From: Syd
  351. ***************
  352. *** 205,211 ****
  353.       register int to_delete = 0, to_store = 0, to_keep = 0, i,
  354.                marked_deleted, marked_read, marked_unread,
  355.                last_sortby, ask_questions,  asked_storage_q,
  356. !              num_chgd_status, need_to_copy, no_restore = FALSE;
  357.       char answer;
  358.       int  err;
  359.       long bytes();
  360. --- 222,228 ----
  361.       register int to_delete = 0, to_store = 0, to_keep = 0, i,
  362.                marked_deleted, marked_read, marked_unread,
  363.                last_sortby, ask_questions,  asked_storage_q,
  364. !              num_chgd_status, need_to_copy;
  365.       char answer;
  366.       int  err;
  367.       long bytes();
  368. ***************
  369. *** 506,516 ****
  370.       if (folder_type == SPOOL)
  371.         lock(OUTGOING);
  372.       
  373.       if (mailfile_size != bytes(cur_folder)) {
  374. !       unlock();
  375. !       error(catgets(elm_msg_cat, ElmSet, ElmLeaveNewMailArrived,
  376. !         "New mail has just arrived. Resynchronizing..."));
  377. !       return(-1);
  378.       }
  379.       
  380.       /* Everything's GO - so ouput that user message and go to it. */
  381. --- 523,535 ----
  382.       if (folder_type == SPOOL)
  383.         lock(OUTGOING);
  384.       
  385. +     fflush (mailfile);
  386.       if (mailfile_size != bytes(cur_folder)) {
  387. !         unlock();
  388. !         error(catgets(elm_msg_cat, ElmSet, ElmLeaveNewMailArrived,
  389. !               "New mail has just arrived. Resynchronizing..."));
  390. !         return(-1);
  391.       }
  392.       
  393.       /* Everything's GO - so ouput that user message and go to it. */
  394. ***************
  395. *** 530,542 ****
  396. --- 549,567 ----
  397.             "Error: Permission to append to folder %s denied!! (%s)\n",
  398.             recvd_mail, "leavembox"));
  399.           dprint(1, (debugfile, "** %s **\n", error_description(err)));
  400. +         fflush (mailfile);
  401.           unlock();
  402.           unblock_signals();
  403.           return(0);
  404.         }
  405.         if ((temp = fopen(recvd_mail,"a")) == NULL) {
  406.           err = errno;
  407. +         fflush (mailfile);
  408.           unlock();
  409.           MoveCursor(LINES, 0);
  410.           Raw(OFF);
  411.           dprint(1, (debugfile, "Error: could not append to file %s\n", 
  412. ***************
  413. *** 572,584 ****
  414. --- 597,615 ----
  415.             "Error: Permission to create temp file %s denied!! (%s)\n",
  416.             temp_keep_file, "leavembox"));
  417.           dprint(1, (debugfile, "** %s **\n", error_description(err)));
  418. +         fflush (mailfile);
  419.           unlock();
  420.           unblock_signals();
  421.           return(0);
  422.         }
  423.         if ((temp = fopen(temp_keep_file,"w")) == NULL) {
  424.           err = errno;
  425. +         fflush (mailfile);
  426.           unlock();
  427.           MoveCursor(LINES, 0);
  428.           Raw(OFF);
  429.           dprint(1, (debugfile, "Error: could not create file %s\n", 
  430. ***************
  431. *** 676,722 ****
  432.        */
  433.       fflush(mailfile);
  434.   
  435. -     if(to_keep) {
  436.   #ifdef SYSCALL_LOCKING
  437. !       need_to_copy = (folder_type == SPOOL ? TRUE : FALSE);
  438.   #else
  439. !       need_to_copy = FALSE;
  440.   #endif /* SYSCALL_LOCKING */
  441.   
  442. !       if (buf.st_nlink > 1)
  443. !         need_to_copy = TRUE;
  444. !       if (buf.st_mode & 0x7000) { /* copy if special modes set */
  445. !          need_to_copy = TRUE;    /* such as enforcement lock */
  446. !          no_restore = TRUE;
  447. !       }
  448.   
  449.   #ifdef SYMLINK
  450.   #ifdef S_ISLNK
  451. !       if (S_ISLNK(lbuf.st_mode))
  452.   #else
  453. !       if ((lbuf.st_mode & S_IFMT) == S_IFLNK)
  454.   #endif
  455. !       {
  456. !          need_to_copy = TRUE;
  457. !          no_restore = TRUE;
  458. !       }
  459.   #endif
  460.   
  461.   #ifdef _PC_CHOWN_RESTRICTED
  462. !       if (!need_to_copy) {
  463.   /*
  464.    * Chown may or may not be restricted to root in SVR4, if it is,
  465.    *    then need to copy must be true, and no restore of permissions
  466.    *    should be performed.
  467.    */
  468. !           if (pathconf(cur_folder, _PC_CHOWN_RESTRICTED)) {
  469. !          need_to_copy = TRUE;
  470. !          no_restore = TRUE;
  471. !           }
  472. !       }
  473.   #endif  /* _PC_CHOWN_RESTRICTED */
  474.   
  475.   #ifdef SAVE_GROUP_MAILBOX_ID
  476.         if (folder_type == SPOOL)
  477.                 setgid(mailgroupid);
  478. --- 707,750 ----
  479.        */
  480.       fflush(mailfile);
  481.   
  482.   #ifdef SYSCALL_LOCKING
  483. !     need_to_copy = (folder_type == SPOOL ? TRUE : FALSE);
  484.   #else
  485. !     need_to_copy = FALSE;
  486.   #endif /* SYSCALL_LOCKING */
  487. +     if (buf.st_nlink > 1)
  488. +         need_to_copy = TRUE;
  489.   
  490. !     if (buf.st_mode & 0x7000) { /* copy if special modes set */
  491. !         need_to_copy = TRUE;    /* such as enforcement lock */
  492. !     }
  493.   
  494.   #ifdef SYMLINK
  495.   #ifdef S_ISLNK
  496. !     if (S_ISLNK(lbuf.st_mode)) {
  497.   #else
  498. !     if ((lbuf.st_mode & S_IFMT) == S_IFLNK) {
  499.   #endif
  500. !         need_to_copy = TRUE;
  501. !     }
  502.   #endif
  503.   
  504.   #ifdef _PC_CHOWN_RESTRICTED
  505. !     if (!need_to_copy) {
  506.   /*
  507.    * Chown may or may not be restricted to root in SVR4, if it is,
  508.    *    then need to copy must be true, and no restore of permissions
  509.    *    should be performed.
  510.    */
  511. !         if (pathconf(cur_folder, _PC_CHOWN_RESTRICTED)) {
  512. !             need_to_copy = TRUE;
  513. !         }
  514. !     }
  515.   #endif  /* _PC_CHOWN_RESTRICTED */
  516.   
  517. +     if(to_keep) {
  518.   #ifdef SAVE_GROUP_MAILBOX_ID
  519.         if (folder_type == SPOOL)
  520.                 setgid(mailgroupid);
  521. ***************
  522. *** 741,746 ****
  523. --- 769,775 ----
  524.               if (folder_type == SPOOL)
  525.             setgid(groupid);
  526.   #endif
  527. +         fflush (mailfile);
  528.           unlock();
  529.           fclose(mailfile);
  530.           emergency_exit();
  531. ***************
  532. *** 750,756 ****
  533.   
  534.         if(need_to_copy) {
  535.   
  536. !         if (copy(temp_keep_file, cur_folder) != 0) {
  537.   
  538.             /* copy to cur_folder failed - try to copy to special file */
  539.             err = errno;
  540. --- 779,785 ----
  541.   
  542.         if(need_to_copy) {
  543.   
  544. !         if (copy(temp_keep_file, cur_folder, TRUE) != 0) {
  545.   
  546.             /* copy to cur_folder failed - try to copy to special file */
  547.             err = errno;
  548. ***************
  549. *** 762,768 ****
  550.             if (sleepmsg > 0)
  551.               sleep((sleepmsg + 1) / 2);
  552.             sprintf(cur_folder,"%s/%s", home, unedited_mail);
  553. !           if (copy(temp_keep_file, cur_folder) != 0) {
  554.   
  555.           /* couldn't copy to special file either */
  556.           err = errno;
  557. --- 791,797 ----
  558.             if (sleepmsg > 0)
  559.               sleep((sleepmsg + 1) / 2);
  560.             sprintf(cur_folder,"%s/%s", home, unedited_mail);
  561. !           if (copy(temp_keep_file, cur_folder, FALSE) != 0) {
  562.   
  563.           /* couldn't copy to special file either */
  564.           err = errno;
  565. ***************
  566. *** 778,783 ****
  567. --- 807,813 ----
  568.               if (folder_type == SPOOL)
  569.             setgid(groupid);
  570.   #endif
  571. +         fflush (mailfile);
  572.           unlock();
  573.           fclose(mailfile);
  574.           emergency_exit();
  575. ***************
  576. *** 815,821 ****
  577.        * tracking down what it points to.
  578.        */
  579.   
  580. !     if (!no_restore) {
  581.         if(restore_file_stats(cur_folder) != 1) {
  582.           error1(catgets(elm_msg_cat, ElmSet, ElmLeaveProblemsRestoringPerms,
  583.             "Problems restoring permissions of folder %s!"), cur_folder);
  584. --- 845,851 ----
  585.        * tracking down what it points to.
  586.        */
  587.   
  588. !     if (!need_to_copy) {
  589.         if(restore_file_stats(cur_folder) != 1) {
  590.           error1(catgets(elm_msg_cat, ElmSet, ElmLeaveProblemsRestoringPerms,
  591.             "Problems restoring permissions of folder %s!"), cur_folder);
  592. ***************
  593. *** 851,860 ****
  594.           setgid(groupid);
  595.   #endif
  596.   
  597.       mailfile_size = bytes(cur_folder);
  598.       unlock();    /* remove the lock on the file ASAP! */
  599.       fclose(mailfile);
  600.       unblock_signals();
  601.       return(1);    
  602.   }
  603. --- 881,891 ----
  604.           setgid(groupid);
  605.   #endif
  606.   
  607. !     fflush (mailfile);
  608.       mailfile_size = bytes(cur_folder);
  609.       unlock();    /* remove the lock on the file ASAP! */
  610.       fclose(mailfile);
  611. +     mailfile = NULL;
  612.       unblock_signals();
  613.       return(1);    
  614.   }
  615.  
  616. Index: src/limit.c
  617. Prereq: 5.3
  618. *** ../elm2.4/src/limit.c    Mon May 31 15:17:02 1993
  619. --- src/limit.c    Sun May 15 19:10:11 1994
  620. ***************
  621. *** 1,8 ****
  622.   
  623. ! static char rcsid[] = "@(#)$Id: limit.c,v 5.3 1993/05/31 19:17:02 syd Exp $";
  624.   
  625.   /*******************************************************************************
  626. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  627.    *
  628.    *            Copyright (c) 1988-1992 USENET Community Trust
  629.    *            Copyright (c) 1986,1987 Dave Taylor
  630. --- 1,8 ----
  631.   
  632. ! static char rcsid[] = "@(#)$Id: limit.c,v 5.4 1994/05/15 23:10:08 syd Exp $";
  633.   
  634.   /*******************************************************************************
  635. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  636.    *
  637.    *            Copyright (c) 1988-1992 USENET Community Trust
  638.    *            Copyright (c) 1986,1987 Dave Taylor
  639. ***************
  640. *** 14,19 ****
  641. --- 14,24 ----
  642.    *
  643.    *******************************************************************************
  644.    * $Log: limit.c,v $
  645. +  * Revision 5.4  1994/05/15  23:10:08  syd
  646. +  * Below are the changes required to compile/link elm 2.4 pl23 under
  647. +  * QNX 4.2 with the Watcom 9.5 compiler (very picky).
  648. +  * From: "Brian Campbell" <brianc@quantum>
  649. +  *
  650.    * Revision 5.3  1993/05/31  19:17:02  syd
  651.    * While looking into the feasibility of adding `limit sender' as requested
  652.    * on Usenet, I noticed that the limit code was replicated for each of
  653. ***************
  654. *** 85,91 ****
  655.       }
  656.   
  657.       while(1) {
  658. !       PutLine1(LINES-2, 0, prompt);
  659.         CleartoEOLN();
  660.   
  661.         criteria[0] = '\0';
  662. --- 90,96 ----
  663.       }
  664.   
  665.       while(1) {
  666. !       PutLine0(LINES-2, 0, prompt);
  667.         CleartoEOLN();
  668.   
  669.         criteria[0] = '\0';
  670.  
  671. Index: src/lock.c
  672. Prereq: 5.15
  673. *** ../elm2.4/src/lock.c    Mon May 31 15:16:24 1993
  674. --- src/lock.c    Sun May 15 19:02:12 1994
  675. ***************
  676. *** 1,8 ****
  677.   
  678. ! static char rcsid[] = "@(#)$Id: lock.c,v 5.15 1993/05/31 19:16:24 syd Exp $";
  679.   
  680.   /*******************************************************************************
  681. !  *  The Elm Mail System  -  $Revision: 5.15 $   $State: Exp $
  682.    *
  683.    *            Copyright (c) 1988-1992 USENET Community Trust
  684.    *            Copyright (c) 1986,1987 Dave Taylor
  685. --- 1,8 ----
  686.   
  687. ! static char rcsid[] = "@(#)$Id: lock.c,v 5.16 1994/05/15 23:02:12 syd Exp $";
  688.   
  689.   /*******************************************************************************
  690. !  *  The Elm Mail System  -  $Revision: 5.16 $   $State: Exp $
  691.    *
  692.    *            Copyright (c) 1988-1992 USENET Community Trust
  693.    *            Copyright (c) 1986,1987 Dave Taylor
  694. ***************
  695. *** 14,19 ****
  696. --- 14,23 ----
  697.    *
  698.    *******************************************************************************
  699.    * $Log: lock.c,v $
  700. +  * Revision 5.16  1994/05/15  23:02:12  syd
  701. +  * Solaris 2.3 can return EACCES or EEXIST for lockfile already existing.
  702. +  * From: xcea@uxa.ecn.bgu.edu (Chad Adams)
  703. +  *
  704.    * Revision 5.15  1993/05/31  19:16:24  syd
  705.    * It looks like there was some earlier patch that re-introduced
  706.    * some lock problems from the past time of 2.4beta.
  707. ***************
  708. *** 301,308 ****
  709.       if((create_fd=open(lockfile,O_WRONLY | O_CREAT | O_EXCL,0444)) != -1)
  710.         break;
  711.       else {
  712. !       if(errno != EEXIST) {
  713.           /* Creation of lock failed NOT because it already exists!!! */
  714.   
  715.           MoveCursor(LINES, 0);
  716.           Raw(OFF);
  717. --- 305,314 ----
  718.       if((create_fd=open(lockfile,O_WRONLY | O_CREAT | O_EXCL,0444)) != -1)
  719.         break;
  720.       else {
  721. !       if(errno != EEXIST && errno != EACCES) {
  722.           /* Creation of lock failed NOT because it already exists!!! */
  723. +             /* If /var/mail nfs mounted on Solaris 2.3 at least you can */
  724. +         /* get EACCES.  Treat it like EEXIST. */
  725.   
  726.           MoveCursor(LINES, 0);
  727.           Raw(OFF);
  728.  
  729. Index: src/mailmsg2.c
  730. Prereq: 5.35
  731. *** ../elm2.4/src/mailmsg2.c    Sun Sep 26 22:15:01 1993
  732. --- src/mailmsg2.c    Mon May 30 13:24:48 1994
  733. ***************
  734. *** 1,8 ****
  735.   
  736. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 5.35 1993/09/27 01:51:38 syd Exp $";
  737.   
  738.   /*******************************************************************************
  739. !  *  The Elm Mail System  -  $Revision: 5.35 $   $State: Exp $
  740.    *
  741.    *             Copyright (c) 1988-1992 USENET Community Trust
  742.    *             Copyright (c) 1986,1987 Dave Taylor
  743. --- 1,8 ----
  744.   
  745. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 5.39 1994/05/30 17:24:38 syd Exp $";
  746.   
  747.   /*******************************************************************************
  748. !  *  The Elm Mail System  -  $Revision: 5.39 $   $State: Exp $
  749.    *
  750.    *             Copyright (c) 1988-1992 USENET Community Trust
  751.    *             Copyright (c) 1986,1987 Dave Taylor
  752. ***************
  753. *** 14,19 ****
  754. --- 14,43 ----
  755.    *
  756.    *******************************************************************************
  757.    * $Log: mailmsg2.c,v $
  758. +  * Revision 5.39  1994/05/30  17:24:38  syd
  759. +  * use Elm routine instead of strcasecmp for portability
  760. +  * From: Syd
  761. +  *
  762. +  * Revision 5.38  1994/05/30  16:43:14  syd
  763. +  * I found a few months old patch I have not sent you before (I guess).
  764. +  * It avoids unknowingly confusing some too rigidly and simple mindedly
  765. +  * coded mailers with weird settings like
  766. +  *
  767. +  *     charset=us-ascii and textencoding=8bit
  768. +  *
  769. +  * This patch will force 7bit encoding with charset=us-ascii.
  770. +  * E.g. older versions of pine will dump core on 8bit & us-ascii.
  771. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  772. +  *
  773. +  * Revision 5.37  1994/05/15  23:10:08  syd
  774. +  * Below are the changes required to compile/link elm 2.4 pl23 under
  775. +  * QNX 4.2 with the Watcom 9.5 compiler (very picky).
  776. +  * From: "Brian Campbell" <brianc@quantum>
  777. +  *
  778. +  * Revision 5.36  1994/03/11  21:25:24  syd
  779. +  * Fix Elm looping if an EOF is received.
  780. +  * From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  781. +  *
  782.    * Revision 5.35  1993/09/27  01:51:38  syd
  783.    * Add elm_chown to consolidate for Xenix not allowing -1
  784.    * From: Syd
  785. ***************
  786. *** 370,376 ****
  787.           dprint(1, (debugfile, 
  788.                 "Can't open included file %s.  Failed with error %s (mail)\n",
  789.             included_file, error_description(errno)));
  790. !         error2(catgets(elm_msg_cat, ElmSet, ElmCouldNotOpenFile,
  791.             "Could not open file %s."), included_file);
  792.           return(need_redraw);
  793.         }
  794. --- 394,400 ----
  795.           dprint(1, (debugfile, 
  796.                 "Can't open included file %s.  Failed with error %s (mail)\n",
  797.             included_file, error_description(errno)));
  798. !         error1(catgets(elm_msg_cat, ElmSet, ElmCouldNotOpenFile,
  799.             "Could not open file %s."), included_file);
  800.           return(need_redraw);
  801.         }
  802. ***************
  803. *** 845,850 ****
  804. --- 869,876 ----
  805.           Raw(ON); /* double check... testing only... */
  806.           MoveCursor(x_coord, y_coord);
  807.           cmd = ReadCh();
  808. +         if (cmd == EOF)
  809. +           leave(0);
  810.           cmd = tolower(cmd);
  811.           did_prompt = TRUE;
  812.       }
  813. ***************
  814. *** 1170,1177 ****
  815.       else {
  816.   #ifdef    MIME
  817.         fprintf(filedesc, "%s\n", MIME_HEADER);
  818. !       fprintf(filedesc, "%s text/plain; charset=%s\n",MIME_CONTENTTYPE, charset);
  819. !       fprintf(filedesc, "Content-Transfer-Encoding: %s\n", text_encoding);
  820.   #else
  821.         fprintf(filedesc, "Content-Type: text\n");
  822.   #endif /* MIME */
  823. --- 1196,1207 ----
  824.       else {
  825.   #ifdef    MIME
  826.         fprintf(filedesc, "%s\n", MIME_HEADER);
  827. !       fprintf(filedesc, "%s text/plain; charset=%s\n",
  828. !           MIME_CONTENTTYPE, charset);
  829. !       fprintf(filedesc, "Content-Transfer-Encoding: %s\n",
  830. !           (!strincmp ("us-ascii", charset)
  831. !            && strincmp ("7bit", text_encoding))
  832. !           ? "7bit" : text_encoding);
  833.   #else
  834.         fprintf(filedesc, "Content-Type: text\n");
  835.   #endif /* MIME */
  836. ***************
  837. *** 1269,1275 ****
  838.           }
  839.               fprintf(dest, "%s text/plain; charset=%s\n",
  840.               MIME_CONTENTTYPE, charset);
  841. !         fprintf(dest, "Content-Transfer-Encoding: %s\n", text_encoding);
  842.           fprintf(dest, "Content-Length: ");
  843.           C_L_Position[1] = ftell(dest);
  844.           fprintf(dest, "          \n"); /* Print Placeholders */
  845. --- 1299,1308 ----
  846.           }
  847.               fprintf(dest, "%s text/plain; charset=%s\n",
  848.               MIME_CONTENTTYPE, charset);
  849. !         fprintf(dest, "Content-Transfer-Encoding: %s\n",
  850. !             (!strincmp ("us-ascii", charset)
  851. !              && strincmp ("7bit", text_encoding))
  852. !             ? "7bit" : text_encoding);
  853.           fprintf(dest, "Content-Length: ");
  854.           C_L_Position[1] = ftell(dest);
  855.           fprintf(dest, "          \n"); /* Print Placeholders */
  856.  
  857. Index: src/newmbox.c
  858. Prereq: 5.34
  859. *** ../elm2.4/src/newmbox.c    Sun Sep 26 22:15:02 1993
  860. --- src/newmbox.c    Sat May 14 14:42:59 1994
  861. ***************
  862. *** 1,8 ****
  863.   
  864. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.34 1993/09/27 01:51:38 syd Exp $";
  865.   
  866.   /*******************************************************************************
  867. !  *  The Elm Mail System  -  $Revision: 5.34 $   $State: Exp $
  868.    *
  869.    *            Copyright (c) 1988-1992 USENET Community Trust
  870.    *            Copyright (c) 1986,1987 Dave Taylor
  871. --- 1,8 ----
  872.   
  873. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.36 1994/05/14 18:42:57 syd Exp $";
  874.   
  875.   /*******************************************************************************
  876. !  *  The Elm Mail System  -  $Revision: 5.36 $   $State: Exp $
  877.    *
  878.    *            Copyright (c) 1988-1992 USENET Community Trust
  879.    *            Copyright (c) 1986,1987 Dave Taylor
  880. ***************
  881. *** 14,19 ****
  882. --- 14,27 ----
  883.    *
  884.    *******************************************************************************
  885.    * $Log: newmbox.c,v $
  886. +  * Revision 5.36  1994/05/14  18:42:57  syd
  887. +  * Here are some more of fixes to correctly call fflush() and unlock() in sequence.
  888. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  889. +  *
  890. +  * Revision 5.35  1994/03/11  21:01:35  syd
  891. +  * detect whether atol() is a macro
  892. +  * From: Mitch DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
  893. +  *
  894.    * Revision 5.34  1993/09/27  01:51:38  syd
  895.    * Add elm_chown to consolidate for Xenix not allowing -1
  896.    * From: Syd
  897. ***************
  898. *** 205,211 ****
  899.   
  900.   char *error_description();
  901.   long bytes();
  902. ! #ifndef ANSI_C /* avoid problems with systems that declare atol as a macro */
  903.   extern void rewind();
  904.   extern long atol();
  905.   #endif
  906. --- 213,219 ----
  907.   
  908.   char *error_description();
  909.   long bytes();
  910. ! #if  !defined(ANSI_C) && !defined(atol) /* avoid problems with systems that declare atol as a macro */
  911.   extern void rewind();
  912.   extern long atol();
  913.   #endif
  914. ***************
  915. *** 421,426 ****
  916. --- 429,437 ----
  917.           if (access(cur_tempfolder, ACCESS_EXISTS) != -1) {
  918.             /* Hey!  What the hell is this?  The temp file already exists? */
  919.             /* Looks like a potential clash of processes on the same file! */
  920. +           fflush (mailfile);
  921.             unlock();                     /* so remove lock file! */
  922.             error(catgets(elm_msg_cat, ElmSet, ElmWhatsThisTempExists,
  923.           "What's this?  The temp folder already exists??"));
  924. ***************
  925. *** 431,436 ****
  926. --- 442,450 ----
  927.             silently_exit();    /* leave without tampering with it! */
  928.           }
  929.           if ((temp = fopen(cur_tempfolder,"w")) == NULL) {
  930. +          fflush (mailfile);
  931.            err = errno;
  932.            unlock();    /* remove lock file! */
  933.            MoveCursor(LINES, 0);
  934. ***************
  935. *** 461,466 ****
  936. --- 475,483 ----
  937.           */
  938.          if ((temp = fopen(cur_tempfolder,"r+")) == NULL) {
  939.            err = errno;
  940. +          fflush (mailfile);
  941.            unlock();    /* remove lock file! */
  942.            MoveCursor(LINES,0);
  943.            Raw(OFF);
  944. ***************
  945. *** 475,480 ****
  946. --- 492,500 ----
  947.           }
  948.          if (fseek(temp, 0, 2) == -1) {
  949.            err = errno;
  950. +          fflush (mailfile);
  951.            unlock();    /* remove lock file! */
  952.            fclose(temp);
  953.            MoveCursor(LINES,0);
  954. ***************
  955. *** 530,535 ****
  956. --- 550,556 ----
  957.   
  958.       /** find the size of the folder then unlock the file **/
  959.   
  960. +     fflush (mailfile);
  961.       mailfile_size = bytes(cur_folder);
  962.       unlock();
  963.   
  964. ***************
  965. *** 695,700 ****
  966. --- 716,722 ----
  967.            */
  968.           if ((count) && (!add_new_only || count > message_count)) {
  969.             headers[count-1]->lines = line;
  970.             if (headers[count-1]->content_length < 0)
  971.               headers[count-1]->content_length = fbytes - content_start;
  972.           }
  973. ***************
  974. *** 988,1006 ****
  975.       }
  976.   
  977.       if (folder_type == SPOOL) {
  978.         unlock();    /* remove lock file! */
  979.         if ((ferror(mailfile)) || (fclose(mailfile) == EOF)) {
  980. !           err = errno;
  981. !           MoveCursor(LINES, 0);
  982. !           Raw(OFF);
  983. !           printf(catgets(elm_msg_cat, ElmSet, ElmCloseOnFolderFailed,
  984. !                   "\nClose on folder %s failed!!\n"),
  985. !                   cur_folder);
  986. !           printf("** %s. **\n", error_description(err));
  987. !           dprint(1, (debugfile, "Can't close on folder %s!!\n",
  988. !              cur_folder));
  989. !           rm_temps_exit();
  990.         }
  991.         if ((ferror(temp)) || (fclose(temp) == EOF)) {
  992.             err = errno;
  993.             MoveCursor(LINES, 0);
  994. --- 1010,1030 ----
  995.       }
  996.   
  997.       if (folder_type == SPOOL) {
  998. +       fflush (mailfile);
  999.         unlock();    /* remove lock file! */
  1000.         if ((ferror(mailfile)) || (fclose(mailfile) == EOF)) {
  1001. !         err = errno;
  1002. !         MoveCursor(LINES, 0);
  1003. !         Raw(OFF);
  1004. !         printf(catgets(elm_msg_cat, ElmSet, ElmCloseOnFolderFailed,
  1005. !                "\nClose on folder %s failed!!\n"),
  1006. !                 cur_folder);
  1007. !         printf("** %s. **\n", error_description(err));
  1008. !         dprint(1, (debugfile, "Can't close on folder %s!!\n",
  1009. !                cur_folder));
  1010. !         rm_temps_exit();
  1011.         }
  1012.         if ((ferror(temp)) || (fclose(temp) == EOF)) {
  1013.             err = errno;
  1014.             MoveCursor(LINES, 0);
  1015. ***************
  1016. *** 1013,1018 ****
  1017. --- 1037,1043 ----
  1018.                cur_tempfolder));
  1019.             rm_temps_exit();
  1020.         }
  1021.         /* sanity check on append - is resulting temp file longer??? */
  1022.         if ( bytes(cur_tempfolder) != mailfile_size) {
  1023.            MoveCursor(LINES, 0);
  1024. ***************
  1025. *** 1022,1027 ****
  1026. --- 1047,1053 ----
  1027.           dprint(1, (debugfile, "newmbox - mbox. != spool mail length"));
  1028.           rm_temps_exit();
  1029.         }
  1030.         if ((mailfile = fopen(cur_tempfolder,"r")) == NULL) {
  1031.           err = errno;
  1032.           MoveCursor(LINES,0);
  1033.  
  1034. Index: src/options.c
  1035. Prereq: 5.16
  1036. *** ../elm2.4/src/options.c    Sun Sep 26 22:15:03 1993
  1037. --- src/options.c    Mon May 30 12:42:50 1994
  1038. ***************
  1039. *** 1,8 ****
  1040.   
  1041. ! static char rcsid[] = "@(#)$Id: options.c,v 5.16 1993/08/03 19:28:39 syd Exp $";
  1042.   
  1043.   /*******************************************************************************
  1044. !  *  The Elm Mail System  -  $Revision: 5.16 $   $State: Exp $
  1045.    *
  1046.    *             Copyright (c) 1986,1987 Dave Taylor
  1047.    *             Copyright (c) 1988-1992 USENET Community Trust
  1048. --- 1,8 ----
  1049.   
  1050. ! static char rcsid[] = "@(#)$Id: options.c,v 5.18 1994/05/30 16:42:48 syd Exp $";
  1051.   
  1052.   /*******************************************************************************
  1053. !  *  The Elm Mail System  -  $Revision: 5.18 $   $State: Exp $
  1054.    *
  1055.    *             Copyright (c) 1986,1987 Dave Taylor
  1056.    *             Copyright (c) 1988-1992 USENET Community Trust
  1057. ***************
  1058. *** 14,19 ****
  1059. --- 14,27 ----
  1060.    *
  1061.    *******************************************************************************
  1062.    * $Log: options.c,v $
  1063. +  * Revision 5.18  1994/05/30  16:42:48  syd
  1064. +  * Just a minor fix to an impossible character comparison.
  1065. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  1066. +  *
  1067. +  * Revision 5.17  1994/03/11  21:25:24  syd
  1068. +  * Fix Elm looping if an EOF is received.
  1069. +  * From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  1070. +  *
  1071.    * Revision 5.16  1993/08/03  19:28:39  syd
  1072.    * Elm tries to replace the system toupper() and tolower() on current
  1073.    * BSD systems, which is unnecessary.  Even worse, the replacements
  1074. ***************
  1075. *** 394,400 ****
  1076.   {
  1077.       /** help menu for the options screen... **/
  1078.   
  1079. !     char c, *ptr, *prompt;
  1080.   
  1081.       ClearLine(LINES-2);        /* clear option prompt message */
  1082.       Centerline(LINES-3, catgets(elm_msg_cat, ElmSet, ElmPressKeyHelp,
  1083. --- 402,409 ----
  1084.   {
  1085.       /** help menu for the options screen... **/
  1086.   
  1087. !     char    *ptr, *prompt;
  1088. !     int    c;
  1089.   
  1090.       ClearLine(LINES-2);        /* clear option prompt message */
  1091.       Centerline(LINES-3, catgets(elm_msg_cat, ElmSet, ElmPressKeyHelp,
  1092. ***************
  1093. *** 403,414 ****
  1094. --- 412,428 ----
  1095.       lower_prompt(prompt = catgets(elm_msg_cat, ElmSet, ElmKeyPrompt, "Key : "));
  1096.   
  1097.       while ((c = ReadCh()) != '.') {
  1098. +       if (c == EOF)
  1099. +         leave(0);
  1100.         c = tolower(c);
  1101.         if (c == '?') {
  1102.            display_helpfile(OPTIONS_HELP);
  1103.            display_options();
  1104.            return;
  1105.         }
  1106.         if ((ptr = one_liner_for(c)) != NULL)
  1107.           error2("%c = %s", c, ptr);
  1108.         else
  1109. ***************
  1110. *** 499,504 ****
  1111. --- 513,520 ----
  1112.         PutLine0(LINES-2, 0, prompt);
  1113.   
  1114.         ch = ReadCh();
  1115. +       if (ch == EOF)
  1116. +         leave(0);
  1117.         ch = tolower(ch);
  1118.   
  1119.         clear_error();    /* remove possible "sorting" message etc... */ 
  1120.  
  1121. Index: src/pattern.c
  1122. Prereq: 5.10
  1123. *** ../elm2.4/src/pattern.c    Sun Sep 26 22:15:03 1993
  1124. --- src/pattern.c    Sun May 15 19:05:20 1994
  1125. ***************
  1126. *** 1,8 ****
  1127.   
  1128. ! static char rcsid[] = "@(#)$Id: pattern.c,v 5.10 1993/09/19 23:15:28 syd Exp $";
  1129.   
  1130.   /*******************************************************************************
  1131. !  *  The Elm Mail System  -  $Revision: 5.10 $   $State: Exp $
  1132.    *
  1133.    *            Copyright (c) 1988-1992 USENET Community Trust
  1134.    *            Copyright (c) 1986,1987 Dave Taylor
  1135. --- 1,8 ----
  1136.   
  1137. ! static char rcsid[] = "@(#)$Id: pattern.c,v 5.11 1994/05/15 23:04:48 syd Exp $";
  1138.   
  1139.   /*******************************************************************************
  1140. !  *  The Elm Mail System  -  $Revision: 5.11 $   $State: Exp $
  1141.    *
  1142.    *            Copyright (c) 1988-1992 USENET Community Trust
  1143.    *            Copyright (c) 1986,1987 Dave Taylor
  1144. ***************
  1145. *** 14,19 ****
  1146. --- 14,23 ----
  1147.    *
  1148.    *******************************************************************************
  1149.    * $Log: pattern.c,v $
  1150. +  * Revision 5.11  1994/05/15  23:04:48  syd
  1151. +  * Fix segv where in_string didnot like searching NULL
  1152. +  * From: Stuart Kemp <stuart@cs.jcu.edu.au> (via syd)
  1153. +  *
  1154.    * Revision 5.10  1993/09/19  23:15:28  syd
  1155.    * Changed a few buffers from LONG_STRING (512) to VERY_LONG_STRING
  1156.    * to avoid long header lines overflowing the allocated space. At
  1157. ***************
  1158. *** 381,394 ****
  1159.   {
  1160.   
  1161.       char *get_alias_address();
  1162.       int dummy;
  1163.   
  1164.       /** Returns true iff the pattern occurs in it's entirety
  1165.           in the fully expanded address of the indicated alias **/
  1166.   
  1167. !     return( in_string(shift_lower(
  1168. !         get_alias_address(aliases[message_number]->alias,TRUE,&dummy)),
  1169. !         pat) );
  1170.   }
  1171.   
  1172.   match_in_message(pat)
  1173. --- 385,400 ----
  1174.   {
  1175.   
  1176.       char *get_alias_address();
  1177. +     char *result;
  1178.       int dummy;
  1179.   
  1180.       /** Returns true iff the pattern occurs in it's entirety
  1181.           in the fully expanded address of the indicated alias **/
  1182.   
  1183. !     result = get_alias_address(aliases[message_number]->alias,TRUE,&dummy);
  1184. !     if (result != NULL)
  1185. !         return(in_string(shift_lower(result), pat) );
  1186. !     return(NULL);
  1187.   }
  1188.   
  1189.   match_in_message(pat)
  1190.  
  1191. Index: src/pmalloc.c
  1192. Prereq: 5.3
  1193. *** ../elm2.4/src/pmalloc.c    Sun Dec  6 23:28:14 1992
  1194. --- src/pmalloc.c    Fri Mar 11 15:59:02 1994
  1195. ***************
  1196. *** 1,8 ****
  1197.   
  1198. ! static char rcsid[] = "@(#)$Id: pmalloc.c,v 5.3 1992/12/07 04:28:03 syd Exp $";
  1199.   
  1200.   /*******************************************************************************
  1201. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1202.    *
  1203.    *            Copyright (c) 1988-1992 USENET Community Trust
  1204.    *            Copyright (c) 1986,1987 Dave Taylor
  1205. --- 1,8 ----
  1206.   
  1207. ! static char rcsid[] = "@(#)$Id: pmalloc.c,v 5.4 1994/03/11 20:59:02 syd Exp $";
  1208.   
  1209.   /*******************************************************************************
  1210. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1211.    *
  1212.    *            Copyright (c) 1988-1992 USENET Community Trust
  1213.    *            Copyright (c) 1986,1987 Dave Taylor
  1214. ***************
  1215. *** 14,19 ****
  1216. --- 14,28 ----
  1217.    *
  1218.    *******************************************************************************
  1219.    * $Log: pmalloc.c,v $
  1220. +  * Revision 5.4  1994/03/11  20:59:02  syd
  1221. +  * I made the following changes to elm 2.4pl23 module pmalloc.c after testing on
  1222. +  * a DEC Alpha running OSF1 v1.3.  The difficulty is that the Alpha hardware
  1223. +  * requires certain alignment for some operations which was not supplied by
  1224. +  * pmalloc (8 byte for addresses instead of 4 byte).  I made a simple minded
  1225. +  * change to pmalloc.c to force alignment of the allocated data block to be
  1226. +  * adequate on DEC Alpha OSF1.
  1227. +  * From: jim@lime.rsmas.miami.edu (Jim Brown)
  1228. +  *
  1229.    * Revision 5.3  1992/12/07  04:28:03  syd
  1230.    * change include from defs to headers as now needs LINES
  1231.    * From: Syd
  1232. ***************
  1233. *** 44,49 ****
  1234. --- 53,60 ----
  1235.   extern nl_catd elm_msg_cat;    /* message catalog        */
  1236.   /*VARARGS0*/
  1237.   
  1238. + #define MIN_BOUNDARY 8 /* power to 2 */
  1239.   char *pmalloc(size)
  1240.   int size; 
  1241.   {
  1242. ***************
  1243. *** 61,66 ****
  1244. --- 72,79 ----
  1245.   
  1246.       /** if bigger than available space, get more, tossing what's left **/
  1247.   
  1248. +     size = ((size+3+4)/4)*4;    /* Go to quad byte boundary, fill */
  1249.       if (size > free_mem) {
  1250.         if ((our_block = (char *) malloc(PMALLOC_BUFFER_SIZE)) == NULL) {
  1251.           MoveCursor(LINES,0);
  1252. ***************
  1253. *** 73,81 ****
  1254.         our_block += 4;  /* just for safety, don't give back true address */
  1255.         free_mem = PMALLOC_BUFFER_SIZE-4;
  1256.       }
  1257. !     
  1258.       return_value  = our_block;    /* get the memory */
  1259. -     size = ((size+3)/4)*4;        /* Go to quad byte boundary */
  1260.       our_block += size;        /* use it up      */
  1261.       free_mem  -= size;        /*  and decrement */
  1262.   
  1263. --- 86,101 ----
  1264.         our_block += 4;  /* just for safety, don't give back true address */
  1265.         free_mem = PMALLOC_BUFFER_SIZE-4;
  1266.       }
  1267. !     if (((long)our_block&(MIN_BOUNDARY-1)) != 0) {
  1268. !       int        drek;
  1269. !       drek = ((long)our_block&(MIN_BOUNDARY-1)); /* round to minimum */
  1270. !       our_block += (MIN_BOUNDARY-drek);
  1271. !       free_mem -= (MIN_BOUNDARY-drek);
  1272. !     }
  1273.       return_value  = our_block;    /* get the memory */
  1274.       our_block += size;        /* use it up      */
  1275.       free_mem  -= size;        /*  and decrement */
  1276.   
  1277.  
  1278. Index: src/save_opts.c
  1279. Prereq: 5.7
  1280. *** ../elm2.4/src/save_opts.c    Sun Sep 26 22:15:13 1993
  1281. --- src/save_opts.c    Fri Mar 11 16:19:26 1994
  1282. ***************
  1283. *** 1,8 ****
  1284.   
  1285. ! static char rcsid[] = "@(#)$Id: save_opts.c,v 5.7 1993/09/27 01:51:38 syd Exp $";
  1286.   
  1287.   /*******************************************************************************
  1288. !  *  The Elm Mail System  -  $Revision: 5.7 $   $State: Exp $
  1289.    *
  1290.    *            Copyright (c) 1988-1992 USENET Community Trust
  1291.    *            Copyright (c) 1986,1987 Dave Taylor
  1292. --- 1,8 ----
  1293.   
  1294. ! static char rcsid[] = "@(#)$Id: save_opts.c,v 5.8 1994/03/11 21:19:26 syd Exp $";
  1295.   
  1296.   /*******************************************************************************
  1297. !  *  The Elm Mail System  -  $Revision: 5.8 $   $State: Exp $
  1298.    *
  1299.    *            Copyright (c) 1988-1992 USENET Community Trust
  1300.    *            Copyright (c) 1986,1987 Dave Taylor
  1301. ***************
  1302. *** 14,19 ****
  1303. --- 14,25 ----
  1304.    *
  1305.    *******************************************************************************
  1306.    * $Log: save_opts.c,v $
  1307. +  * Revision 5.8  1994/03/11  21:19:26  syd
  1308. +  * Recognize the "#$HDR" magic cookie as the header to place in the
  1309. +  * user's elmrc file rather than hardwiring a minimally helpful
  1310. +  * string into the binary.
  1311. +  * From: chip@chinacat.unicom.com (Chip Rosenthal)
  1312. +  *
  1313.    * Revision 5.7  1993/09/27  01:51:38  syd
  1314.    * Add elm_chown to consolidate for Xenix not allowing -1
  1315.    * From: Syd
  1316. ***************
  1317. *** 233,238 ****
  1318. --- 239,245 ----
  1319.   {
  1320.       register int x, local_value;
  1321.       register char *s;
  1322. +     char buf[SLEN];
  1323.   
  1324.       /** save the information in the file.  If elminfo_fd == NULL don't look
  1325.           for comments!
  1326. ***************
  1327. *** 252,262 ****
  1328.         fprintf(newelmrc, catgets(elm_msg_cat, ElmrcSet, ElmrcSavedAuto,
  1329.           "# Saved automatically by ELM %s\n#\n\n"), version_buff);
  1330.   
  1331. !     fprintf(newelmrc, catgets(elm_msg_cat, ElmrcSet, ElmrcYesNoMeans,
  1332. !         "# For yes/no settings with ?, ON means yes, OFF means no\n"));
  1333.   
  1334.       for (x = 0; x < NUMBER_OF_SAVEABLE_OPTIONS; x++) {
  1335. -         char buf[SLEN];
  1336.   
  1337.           /** skip system-only options **/
  1338.           if (save_info[x].flags & FL_SYS)
  1339. --- 259,279 ----
  1340.         fprintf(newelmrc, catgets(elm_msg_cat, ElmrcSet, ElmrcSavedAuto,
  1341.           "# Saved automatically by ELM %s\n#\n\n"), version_buff);
  1342.   
  1343. !     if (elminfo_fd != NULL) {
  1344. !         x = FALSE;
  1345. !         rewind(elminfo_fd);
  1346. !         while (!x && fgets(buf, sizeof(buf), elminfo_fd) != NULL)
  1347. !             x = (strncmp(buf, "#$HDR", 5) == 0);
  1348. !         if (x) {
  1349. !             while (fgets(buf, sizeof(buf), elminfo_fd) != NULL) {
  1350. !                 if (buf[0] != '#')
  1351. !                     break;
  1352. !                 fputs(buf, newelmrc);
  1353. !             }
  1354. !         }
  1355. !     }
  1356.   
  1357.       for (x = 0; x < NUMBER_OF_SAVEABLE_OPTIONS; x++) {
  1358.   
  1359.           /** skip system-only options **/
  1360.           if (save_info[x].flags & FL_SYS)
  1361.  
  1362. Index: src/savecopy.c
  1363. Prereq: 5.12
  1364. *** ../elm2.4/src/savecopy.c    Mon May 31 15:35:25 1993
  1365. --- src/savecopy.c    Sun May 15 19:10:12 1994
  1366. ***************
  1367. *** 1,8 ****
  1368.   
  1369. ! static char rcsid[] = "@(#)$Id: savecopy.c,v 5.12 1993/05/31 19:35:24 syd Exp $";
  1370.   
  1371.   /*******************************************************************************
  1372. !  *  The Elm Mail System  -  $Revision: 5.12 $   $State: Exp $
  1373.    *
  1374.    *             Copyright (c) 1988-1992 USENET Community Trust
  1375.    *             Copyright (c) 1986,1987 Dave Taylor
  1376. --- 1,8 ----
  1377.   
  1378. ! static char rcsid[] = "@(#)$Id: savecopy.c,v 5.13 1994/05/15 23:10:08 syd Exp $";
  1379.   
  1380.   /*******************************************************************************
  1381. !  *  The Elm Mail System  -  $Revision: 5.13 $   $State: Exp $
  1382.    *
  1383.    *             Copyright (c) 1988-1992 USENET Community Trust
  1384.    *             Copyright (c) 1986,1987 Dave Taylor
  1385. ***************
  1386. *** 14,19 ****
  1387. --- 14,24 ----
  1388.    *
  1389.    *******************************************************************************
  1390.    * $Log: savecopy.c,v $
  1391. +  * Revision 5.13  1994/05/15  23:10:08  syd
  1392. +  * Below are the changes required to compile/link elm 2.4 pl23 under
  1393. +  * QNX 4.2 with the Watcom 9.5 compiler (very picky).
  1394. +  * From: "Brian Campbell" <brianc@quantum>
  1395. +  *
  1396.    * Revision 5.12  1993/05/31  19:35:24  syd
  1397.    * Move the actual file saving code out of "save_copy()" into a seperate
  1398.    * routine called "append_copy_to_file()" to make it globally available.
  1399. ***************
  1400. *** 342,348 ****
  1401.       /* else user presumably left our English expansion - no change in fn */
  1402.   
  1403.       /* display English expansion of new user input a while */
  1404. !     PutLine1(LINES-2, strlen(ncf_prompt), cf_english(fn));
  1405.       MoveCursor(LINES, 0);
  1406.       if (sleepmsg > 0)
  1407.           sleep((sleepmsg + 1) / 2);
  1408. --- 347,353 ----
  1409.       /* else user presumably left our English expansion - no change in fn */
  1410.   
  1411.       /* display English expansion of new user input a while */
  1412. !     PutLine0(LINES-2, strlen(ncf_prompt), cf_english(fn));
  1413.       MoveCursor(LINES, 0);
  1414.       if (sleepmsg > 0)
  1415.           sleep((sleepmsg + 1) / 2);
  1416.  
  1417. Index: src/showmsg.c
  1418. Prereq: 5.15
  1419. *** ../elm2.4/src/showmsg.c    Sun Sep 26 22:15:05 1993
  1420. --- src/showmsg.c    Tue Aug 30 11:09:44 1994
  1421. ***************
  1422. *** 1,8 ****
  1423.   
  1424. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.15 1993/08/23 02:46:07 syd Exp $";
  1425.   
  1426.   /*******************************************************************************
  1427. !  *  The Elm Mail System  -  $Revision: 5.15 $   $State: Exp $
  1428.    *
  1429.    *             Copyright (c) 1988-1992 USENET Community Trust
  1430.    *             Copyright (c) 1986,1987 Dave Taylor
  1431. --- 1,8 ----
  1432.   
  1433. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.16 1994/08/30 15:09:43 syd Exp $";
  1434.   
  1435.   /*******************************************************************************
  1436. !  *  The Elm Mail System  -  $Revision: 5.16 $   $State: Exp $
  1437.    *
  1438.    *             Copyright (c) 1988-1992 USENET Community Trust
  1439.    *             Copyright (c) 1986,1987 Dave Taylor
  1440. ***************
  1441. *** 14,19 ****
  1442. --- 14,23 ----
  1443.    *
  1444.    *******************************************************************************
  1445.    * $Log: showmsg.c,v $
  1446. +  * Revision 5.16  1994/08/30  15:09:43  syd
  1447. +  * Block sigwinch when in the external pager.
  1448. +  * From: jwa@yog-sothoth.dcrt.nih.gov (James W. Adams)
  1449. +  *
  1450.    * Revision 5.15  1993/08/23  02:46:07  syd
  1451.    * Don't declare _exit() if <unistd.h> already did it.
  1452.    * From: decwrl!uunet.UU.NET!fin!chip (Chip Salzenberg)
  1453. ***************
  1454. *** 163,168 ****
  1455. --- 167,175 ----
  1456.   #ifdef    SIGTSTP
  1457.       SIGHAND_TYPE    (*oldstop)(), (*oldcont)();
  1458.   #endif
  1459. + #ifdef    SIGWINCH
  1460. +     SIGHAND_TYPE    (*oldwinch)();
  1461. + #endif
  1462.   
  1463.       lines = current_header->lines; 
  1464.   
  1465. ***************
  1466. *** 343,348 ****
  1467. --- 350,358 ----
  1468.         oldstop = signal(SIGTSTP,SIG_DFL);
  1469.         oldcont = signal(SIGCONT,SIG_DFL);
  1470.   #endif 
  1471. + #ifdef    SIGWINCH
  1472. +       oldwinch = signal(SIGWINCH,SIG_DFL);
  1473. + #endif
  1474.       }
  1475.   
  1476.       ClearScreen();
  1477. ***************
  1478. *** 565,570 ****
  1479. --- 575,583 ----
  1480.   #ifdef    SIGTSTP
  1481.         (void)signal(SIGTSTP,oldstop);
  1482.         (void)signal(SIGCONT,oldcont);
  1483. + #endif
  1484. + #ifdef    SIGWINCH
  1485. +       (void)signal(SIGWINCH,oldwinch);
  1486.   #endif
  1487.       }
  1488.   
  1489.  
  1490. Index: src/showmsg_c.c
  1491. Prereq: 5.3
  1492. *** ../elm2.4/src/showmsg_c.c    Sun Apr 11 23:14:20 1993
  1493. --- src/showmsg_c.c    Fri Mar 11 16:25:27 1994
  1494. ***************
  1495. *** 1,8 ****
  1496.   
  1497. ! static char rcsid[] = "@(#)$Id: showmsg_c.c,v 5.3 1992/11/26 00:46:13 syd Exp $";
  1498.   
  1499.   /*******************************************************************************
  1500. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1501.    *
  1502.    *            Copyright (c) 1988-1992 USENET Community Trust
  1503.    *            Copyright (c) 1986,1987 Dave Taylor
  1504. --- 1,8 ----
  1505.   
  1506. ! static char rcsid[] = "@(#)$Id: showmsg_c.c,v 5.4 1994/03/11 21:25:24 syd Exp $";
  1507.   
  1508.   /*******************************************************************************
  1509. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1510.    *
  1511.    *            Copyright (c) 1988-1992 USENET Community Trust
  1512.    *            Copyright (c) 1986,1987 Dave Taylor
  1513. ***************
  1514. *** 14,19 ****
  1515. --- 14,23 ----
  1516.    *
  1517.    *******************************************************************************
  1518.    * $Log: showmsg_c.c,v $
  1519. +  * Revision 5.4  1994/03/11  21:25:24  syd
  1520. +  * Fix Elm looping if an EOF is received.
  1521. +  * From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  1522. +  *
  1523.    * Revision 5.3  1992/11/26  00:46:13  syd
  1524.    * changes to first change screen back (Raw off) and then issue final
  1525.    * error message.
  1526. ***************
  1527. *** 221,231 ****
  1528.                goto next_undel_msg;
  1529.                  break;
  1530.   
  1531. -         case 'T' :
  1532.           case 't' : istagged=tag_message(FALSE);    
  1533. !                if (command == 'T')
  1534. !              goto next_undel_msg;
  1535. !                else if (istagged)
  1536.                store_msg(catgets(elm_msg_cat, ElmSet, ElmMessageTagged,
  1537.                   "Message tagged."));
  1538.                  else 
  1539. --- 225,232 ----
  1540.                goto next_undel_msg;
  1541.                  break;
  1542.   
  1543.           case 't' : istagged=tag_message(FALSE);    
  1544. !                if(istagged)
  1545.                store_msg(catgets(elm_msg_cat, ElmSet, ElmMessageTagged,
  1546.                   "Message tagged."));
  1547.                  else 
  1548. ***************
  1549. *** 262,267 ****
  1550. --- 263,270 ----
  1551.           case ctrl('M'):  screen_mangled = 0;
  1552.                    return(show_msg(current));
  1553.   
  1554. +         case EOF    : leave(0);
  1555. +                           break;
  1556.   
  1557.               case ESCAPE : if (cursor_control) {
  1558.     
  1559.  
  1560. Index: src/signals.c
  1561. Prereq: 5.9
  1562. *** ../elm2.4/src/signals.c    Sun Sep 26 22:15:06 1993
  1563. --- src/signals.c    Thu Sep  1 15:42:41 1994
  1564. ***************
  1565. *** 1,8 ****
  1566.   
  1567. ! static char rcsid[] = "@(#)$Id: signals.c,v 5.9 1993/08/03 19:10:50 syd Exp $";
  1568.   
  1569.   /*******************************************************************************
  1570. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  1571.    *
  1572.    *            Copyright (c) 1988-1992 USENET Community Trust
  1573.    *            Copyright (c) 1986,1987 Dave Taylor
  1574. --- 1,8 ----
  1575.   
  1576. ! static char rcsid[] = "@(#)$Id: signals.c,v 5.13 1994/09/01 19:42:39 syd Exp $";
  1577.   
  1578.   /*******************************************************************************
  1579. !  *  The Elm Mail System  -  $Revision: 5.13 $   $State: Exp $
  1580.    *
  1581.    *            Copyright (c) 1988-1992 USENET Community Trust
  1582.    *            Copyright (c) 1986,1987 Dave Taylor
  1583. ***************
  1584. *** 14,19 ****
  1585. --- 14,35 ----
  1586.    *
  1587.    *******************************************************************************
  1588.    * $Log: signals.c,v $
  1589. +  * Revision 5.13  1994/09/01  19:42:39  syd
  1590. +  * Moved #defines for SETJMP & LONGJMP from src/editmsg.c to hdrs/defs.h and
  1591. +  * used them instead of (set|long)jmp directly. This makes the usage consistent
  1592. +  * and Solaris 2.3 behaves correctly w.r.t stop/continue.
  1593. +  * From: Jan.Djarv@sa.erisoft.se (Jan Djarv)
  1594. +  *
  1595. +  * Revision 5.12  1994/08/30  18:59:38  syd
  1596. +  * add sigcont to release list
  1597. +  *
  1598. +  * Revision 5.11  1994/08/30  18:27:47  syd
  1599. +  * fix typo
  1600. +  *
  1601. +  * Revision 5.10  1994/08/30  18:16:05  syd
  1602. +  * Fix up Solaris and SVR4 signal handling for timeout
  1603. +  * From: Syd
  1604. +  *
  1605.    * Revision 5.9  1993/08/03  19:10:50  syd
  1606.    * Patch for Elm 2.4 PL22 to correct handling of SIGWINCH signals on
  1607.    * DecStations with Ultrix 4.2.
  1608. ***************
  1609. *** 137,149 ****
  1610.   SIGHAND_TYPE
  1611.   alarm_signal(sig)
  1612.   {    
  1613.       /** silently process alarm signal for timeouts... **/
  1614. - #ifdef    BSD
  1615.       if (InGetPrompt)
  1616. !         longjmp(GetPromptBuf, 1);
  1617. ! #else
  1618. !     signal(SIGALRM, alarm_signal);
  1619.   #endif
  1620.   }
  1621.   
  1622.   SIGHAND_TYPE
  1623. --- 153,168 ----
  1624.   SIGHAND_TYPE
  1625.   alarm_signal(sig)
  1626.   {    
  1627. +     signal(SIGALRM, alarm_signal);
  1628.       /** silently process alarm signal for timeouts... **/
  1629.       if (InGetPrompt)
  1630. !         {
  1631. ! #ifdef HASSIGHOLD
  1632. !         sigrelse(SIGALRM);
  1633.   #endif
  1634. +         LONGJMP(GetPromptBuf, 1);
  1635. +         }
  1636.   }
  1637.   
  1638.   SIGHAND_TYPE
  1639. ***************
  1640. *** 186,194 ****
  1641.       /** this is called when returning from a ^Z stop **/
  1642.       dprint(1, (debugfile,"\n\n** Received SIGCONT **\n\n\n\n", sig));
  1643.   
  1644. - #ifndef    BSD
  1645.       signal(SIGCONT, sig_return_from_user_stop);
  1646. - #endif
  1647.       signal(SIGTSTP, sig_user_stop);
  1648.   
  1649.       printf(catgets(elm_msg_cat, ElmSet, ElmBackInElmRedraw,
  1650. --- 205,211 ----
  1651. ***************
  1652. *** 197,206 ****
  1653.       if (was_in_raw_state)
  1654.         Raw(ON);
  1655.   
  1656. - #ifdef    BSD
  1657.       if (InGetPrompt)
  1658. !         longjmp(GetPromptBuf, 1);
  1659.   #endif
  1660.   }
  1661.   #endif
  1662.   
  1663. --- 214,227 ----
  1664.       if (was_in_raw_state)
  1665.         Raw(ON);
  1666.   
  1667.       if (InGetPrompt)
  1668. !         {
  1669. ! #ifdef HASSIGHOLD
  1670. !         sigrelse(SIGTSTP);
  1671. !         sigrelse(SIGCONT);
  1672.   #endif
  1673. +         LONGJMP(GetPromptBuf, 1);
  1674. +         }
  1675.   }
  1676.   #endif
  1677.   
  1678. ***************
  1679. *** 209,220 ****
  1680.   winch_signal(sig)
  1681.   {
  1682.       resize_screen = 1;
  1683. - #ifndef    BSD
  1684.       signal(SIGWINCH, winch_signal);
  1685. ! #else
  1686.       if (InGetPrompt)
  1687. !       longjmp(GetPromptBuf, 1);
  1688.   #endif
  1689.   }
  1690.   #endif
  1691.   
  1692. --- 230,244 ----
  1693.   winch_signal(sig)
  1694.   {
  1695.       resize_screen = 1;
  1696.       signal(SIGWINCH, winch_signal);
  1697.       if (InGetPrompt)
  1698. !         {
  1699. ! #ifdef HASSIGHOLD
  1700. !         sigrelse(SIGWINCH);
  1701.   #endif
  1702. +         LONGJMP(GetPromptBuf, 1);
  1703. +         }
  1704.   }
  1705.   #endif
  1706.   
  1707.  
  1708. Index: src/syscall.c
  1709. Prereq: 5.8
  1710. *** ../elm2.4/src/syscall.c    Sun Sep 26 22:15:06 1993
  1711. --- src/syscall.c    Tue Aug 30 11:09:43 1994
  1712. ***************
  1713. *** 1,8 ****
  1714.   
  1715. ! static char rcsid[] = "@(#)$Id: syscall.c,v 5.8 1993/08/23 02:46:07 syd Exp $";
  1716.   
  1717.   /*******************************************************************************
  1718. !  *  The Elm Mail System  -  $Revision: 5.8 $   $State: Exp $
  1719.    *
  1720.    *            Copyright (c) 1988-1992 USENET Community Trust
  1721.    *            Copyright (c) 1986,1987 Dave Taylor
  1722. --- 1,8 ----
  1723.   
  1724. ! static char rcsid[] = "@(#)$Id: syscall.c,v 5.9 1994/08/30 15:09:43 syd Exp $";
  1725.   
  1726.   /*******************************************************************************
  1727. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  1728.    *
  1729.    *            Copyright (c) 1988-1992 USENET Community Trust
  1730.    *            Copyright (c) 1986,1987 Dave Taylor
  1731. ***************
  1732. *** 14,19 ****
  1733. --- 14,23 ----
  1734.    *
  1735.    *******************************************************************************
  1736.    * $Log: syscall.c,v $
  1737. +  * Revision 5.9  1994/08/30  15:09:43  syd
  1738. +  * Block sigwinch when in the external pager.
  1739. +  * From: jwa@yog-sothoth.dcrt.nih.gov (James W. Adams)
  1740. +  *
  1741.    * Revision 5.8  1993/08/23  02:46:07  syd
  1742.    * Don't declare _exit() if <unistd.h> already did it.
  1743.    * From: decwrl!uunet.UU.NET!fin!chip (Chip Salzenberg)
  1744. ***************
  1745. *** 184,190 ****
  1746.   #else
  1747.       int status;
  1748.   #endif
  1749. !     register SIGHAND_TYPE (*istat)(), (*qstat)();
  1750.   #ifdef SIGTSTP
  1751.       register SIGHAND_TYPE (*oldstop)(), (*oldstart)();
  1752.   #endif
  1753. --- 188,194 ----
  1754.   #else
  1755.       int status;
  1756.   #endif
  1757. !     register SIGHAND_TYPE (*istat)(), (*qstat)(), (*wstat)();
  1758.   #ifdef SIGTSTP
  1759.       register SIGHAND_TYPE (*oldstop)(), (*oldstart)();
  1760.   #endif
  1761. ***************
  1762. *** 224,229 ****
  1763. --- 228,236 ----
  1764.   
  1765.       istat = signal(SIGINT, SIG_IGN);
  1766.       qstat = signal(SIGQUIT, SIG_IGN);
  1767. + #ifdef SIGWINCH
  1768. +     wstat = signal(SIGWINCH, SIG_DFL);
  1769. + #endif
  1770.   #ifdef SIGTSTP
  1771.       oldstop = signal(SIGTSTP, SIG_DFL);
  1772.       oldstart = signal(SIGCONT, SIG_DFL);
  1773. ***************
  1774. *** 323,328 ****
  1775. --- 330,338 ----
  1776.     
  1777.       (void) signal(SIGINT, istat);
  1778.       (void) signal(SIGQUIT, qstat);
  1779. + #ifdef SIGWINCH
  1780. +     (void) signal(SIGWINCH, wstat);
  1781. + #endif
  1782.   #ifdef SIGTSTP
  1783.       (void) signal(SIGTSTP, oldstop);
  1784.       (void) signal(SIGCONT, oldstart);
  1785.  
  1786. Index: src/utils.c
  1787. Prereq: 5.15
  1788. *** ../elm2.4/src/utils.c    Sun Sep 26 22:15:07 1993
  1789. --- src/utils.c    Fri Jun  3 13:05:33 1994
  1790. ***************
  1791. *** 1,8 ****
  1792.   
  1793. ! static char rcsid[] = "@(#)$Id: utils.c,v 5.15 1993/09/27 01:51:38 syd Exp $";
  1794.   
  1795.   /*******************************************************************************
  1796. !  *  The Elm Mail System  -  $Revision: 5.15 $   $State: Exp $
  1797.    *
  1798.    *            Copyright (c) 1988-1992 USENET Community Trust
  1799.    *            Copyright (c) 1986,1987 Dave Taylor
  1800. --- 1,8 ----
  1801.   
  1802. ! static char rcsid[] = "@(#)$Id: utils.c,v 5.17 1994/06/03 17:05:17 syd Exp $";
  1803.   
  1804.   /*******************************************************************************
  1805. !  *  The Elm Mail System  -  $Revision: 5.17 $   $State: Exp $
  1806.    *
  1807.    *            Copyright (c) 1988-1992 USENET Community Trust
  1808.    *            Copyright (c) 1986,1987 Dave Taylor
  1809. ***************
  1810. *** 14,19 ****
  1811. --- 14,27 ----
  1812.    *
  1813.    *******************************************************************************
  1814.    * $Log: utils.c,v $
  1815. +  * Revision 5.17  1994/06/03  17:05:17  syd
  1816. +  * try and prevent copy from calling elm_chown unless needed
  1817. +  * From: Syd
  1818. +  *
  1819. +  * Revision 5.16  1994/05/14  18:42:57  syd
  1820. +  * Here are some more of fixes to correctly call fflush() and unlock() in sequence.
  1821. +  * From: Jukka Ukkonen <ukkonen@csc.fi>
  1822. +  *
  1823.    * Revision 5.15  1993/09/27  01:51:38  syd
  1824.    * Add elm_chown to consolidate for Xenix not allowing -1
  1825.    * From: Syd
  1826. ***************
  1827. *** 179,185 ****
  1828.         MCprintf(catgets(elm_msg_cat, ElmSet, ElmCopyingFromCopyingTo,
  1829.           "\n\rCopying from: %s\n\rCopying to:   %s\n\r"),
  1830.             source, dest);
  1831. !       copy(source, dest);
  1832.       }
  1833.   
  1834.       sprintf(source, "%s/.elmrc", home);
  1835. --- 187,193 ----
  1836.         MCprintf(catgets(elm_msg_cat, ElmSet, ElmCopyingFromCopyingTo,
  1837.           "\n\rCopying from: %s\n\rCopying to:   %s\n\r"),
  1838.             source, dest);
  1839. !       copy(source, dest, FALSE);
  1840.       }
  1841.   
  1842.       sprintf(source, "%s/.elmrc", home);
  1843. ***************
  1844. *** 188,194 ****
  1845.         MCprintf(catgets(elm_msg_cat, ElmSet, ElmCopyingFromCopyingTo,
  1846.           "\n\rCopying from: %s\n\rCopying to:   %s\n\r"),
  1847.             source, dest);
  1848. !       copy(source, dest);
  1849.       }
  1850.   
  1851.       printf(catgets(elm_msg_cat, ElmSet, ElmWelcomeToNewElm,
  1852. --- 196,202 ----
  1853.         MCprintf(catgets(elm_msg_cat, ElmSet, ElmCopyingFromCopyingTo,
  1854.           "\n\rCopying from: %s\n\rCopying to:   %s\n\r"),
  1855.             source, dest);
  1856. !       copy(source, dest, FALSE);
  1857.       }
  1858.   
  1859.       printf(catgets(elm_msg_cat, ElmSet, ElmWelcomeToNewElm,
  1860. ***************
  1861. *** 291,296 ****
  1862. --- 299,306 ----
  1863.           (void) unlink(cur_tempfolder);
  1864.       }
  1865.   
  1866. +     if (mailfile)
  1867. +         fflush (mailfile);
  1868.       unlock();                               /* remove lock file if any */
  1869.   
  1870.       if(do_cursor) {
  1871.  
  1872. Index: utils/Makefile.SH
  1873. Prereq: 5.5
  1874. *** ../elm2.4/utils/Makefile.SH    Mon May 31 15:17:28 1993
  1875. --- utils/Makefile.SH    Thu Mar 10 12:20:29 1994
  1876. ***************
  1877. *** 16,22 ****
  1878.   echo "Extracting utils/Makefile (with variable substitutions)"
  1879.   cat >Makefile <<!GROK!THIS!
  1880.   
  1881. ! # @(#)$Id: Makefile.SH,v 5.5 1993/05/31 19:17:28 syd Exp $
  1882.   #
  1883.   #  Makefile for the Elm system utilities
  1884.   #
  1885. --- 16,22 ----
  1886.   echo "Extracting utils/Makefile (with variable substitutions)"
  1887.   cat >Makefile <<!GROK!THIS!
  1888.   
  1889. ! # @(#)$Id: Makefile.SH,v 5.6 1994/03/10 17:20:23 syd Exp $
  1890.   #
  1891.   #  Makefile for the Elm system utilities
  1892.   #
  1893. ***************
  1894. *** 29,34 ****
  1895. --- 29,38 ----
  1896.   #            dsinc!elm
  1897.   #
  1898.   # $Log: Makefile.SH,v $
  1899. + # Revision 5.6  1994/03/10  17:20:23  syd
  1900. + # Remove autoreply
  1901. + # From: Syd
  1902. + #
  1903.   # Revision 5.5  1993/05/31  19:17:28  syd
  1904.   # In the Makefile listalias was given only a+x permission
  1905.   # though it should have been a+rx.
  1906. ***************
  1907. *** 88,95 ****
  1908.   #        List of installed programs - excludes wnewmail and nfrm,
  1909.   #        which are handled separately
  1910.   INSTALL_LIST    =    $(DEST)/answer        \
  1911. -             $(DEST)/arepdaemon    \
  1912. -             $(DEST)/autoreply    \
  1913.               $(DEST)/checkalias    \
  1914.               $(DEST)/elmalias    \
  1915.               $(DEST)/fastmail    \
  1916. --- 92,97 ----
  1917. ***************
  1918. *** 104,111 ****
  1919.   
  1920.   #        List of remotely install programs
  1921.   REMOTE_LIST    =    $(REMOTE)$(DEST)/answer        \
  1922. -             $(REMOTE)$(DEST)/arepdaemon    \
  1923. -             $(REMOTE)$(DEST)/autoreply    \
  1924.               $(REMOTE)$(DEST)/checkalias    \
  1925.               $(REMOTE)$(DEST)/elmalias    \
  1926.               $(REMOTE)$(DEST)/fastmail    \
  1927. --- 106,111 ----
  1928. ***************
  1929. *** 119,126 ****
  1930.   
  1931.   #        List of programs in bin directory
  1932.   BINARY_LIST    =    $(BIN)/answer        \
  1933. -             $(BIN)/arepdaemon    \
  1934. -             $(BIN)/autoreply    \
  1935.               $(BIN)/checkalias    \
  1936.               $(BIN)/elmalias        \
  1937.               $(BIN)/fastmail        \
  1938. --- 119,124 ----
  1939. ***************
  1940. *** 135,142 ****
  1941.   
  1942.   #        List of programs to $(LINT) - only C programs
  1943.   LINT_LIST    =    answer_lint    \
  1944. -             arepdaemon_lint    \
  1945. -             autoreply_lint    \
  1946.               elmalias_lint    \
  1947.               fastmail_lint    \
  1948.               frm_lint    \
  1949. --- 133,138 ----
  1950. ***************
  1951. *** 147,154 ****
  1952.   
  1953.   #    List of all object files in all util programs (used in parallel makes)
  1954.   UTIL_OBJ    =    answer.o        \
  1955. -             arepdaem.o         \
  1956. -             autoreply.o        \
  1957.               elmalias.o        \
  1958.               fastmail.o        \
  1959.               from.o            \
  1960. --- 143,148 ----
  1961. ***************
  1962. *** 160,169 ****
  1963.   #    Lists of source and object files for each C program
  1964.   ANSWER_SRC    =    answer.c
  1965.   ANSWER_OBJ    =    answer.o
  1966. - AREPDAEMON_SRC    =    arepdaem.c
  1967. - AREPDAEMON_OBJ    =    arepdaem.o
  1968. - AUTOREPLY_SRC    =    autoreply.c
  1969. - AUTOREPLY_OBJ    =    autoreply.o
  1970.   ELMALIAS_SRC    =    elmalias.c
  1971.   ELMALIAS_OBJ    =    elmalias.o
  1972.   FASTMAIL_SRC    =    fastmail.c
  1973. --- 154,159 ----
  1974. ***************
  1975. *** 195,202 ****
  1976.   #    with respect the files from which it is installed.
  1977.   rmt-install:        rmt-defined
  1978.               -$(MV) $(DEST)/answer $(DEST)/answer.old
  1979. -             -$(MV) $(DEST)/arepdaemon $(DEST)/arepdaemon.old
  1980. -             -$(MV) $(DEST)/autoreply $(DEST)/autoreply.old
  1981.               -$(MV) $(DEST)/checkalias $(DEST)/checkalias.old
  1982.               -$(MV) $(DEST)/elmalias $(DEST)/elmalias.old
  1983.               -$(MV) $(DEST)/fastmail $(DEST)/fastmail.old
  1984. --- 185,190 ----
  1985. ***************
  1986. *** 210,217 ****
  1987.               -$(MV) $(DEST)/readmsg $(DEST)/readmsg.old
  1988.               -$(MV) $(DEST)/wnewmail $(DEST)/wnewmail.old
  1989.               -$(RM) $(DEST)/answer.old
  1990. -             -$(RM) $(DEST)/arepdaemon.old
  1991. -             -$(RM) $(DEST)/autoreply.old
  1992.               -$(RM) $(DEST)/checkalias.old
  1993.               -$(RM) $(DEST)/elmalias.old
  1994.               -$(RM) $(DEST)/fastmail.old
  1995. --- 198,203 ----
  1996. ***************
  1997. *** 266,283 ****
  1998.   answer_lint:        $(ANSWER_SRC)
  1999.               $(LINT) $(LINTFLAGS) $(ANSWER_SRC) >> LINT.OUT
  2000.   
  2001. - $(BIN)/arepdaemon:    $(AREPDAEMON_OBJ) ../lib/libutil.a
  2002. -             $(CC) $(LFLAGS) -o $@ $(AREPDAEMON_OBJ) ../lib/libutil.a $(LIB2)
  2003. - arepdaemon_lint:    $(AREPDAEMON_SRC)
  2004. -             $(LINT) $(LINTFLAGS) $(AREPDAEMON_SRC) >> LINT.OUT
  2005. - $(BIN)/autoreply:    $(AUTOREPLY_OBJ) ../lib/libutil.a
  2006. -             $(CC) $(LFLAGS) -o $@ $(AUTOREPLY_OBJ) ../lib/libutil.a $(LIB2)
  2007. - autoreply_lint:        $(AUTOREPLY_SRC)
  2008. -             $(LINT) $(LINTFLAGS) $(AUTOREPLY_SRC) >> LINT.OUT
  2009.   $(BIN)/elmalias:    $(ELMALIAS_OBJ) ../lib/libutil.a
  2010.               $(CC) $(LFLAGS) -o $@ $(ELMALIAS_OBJ) ../lib/libutil.a $(LIB2)
  2011.   
  2012. --- 252,257 ----
  2013. ***************
  2014. *** 353,360 ****
  2015.   
  2016.   #    Dependencies of C object files
  2017.   answer.o:    $(INCLDIR)/ndbz.h $(INCLDIR)/elmutil.h $(INCLDIR)/s_answer.h
  2018. - arepdaem.o:    $(INCLDIR)/elmutil.h
  2019. - autoreply.o:    $(INCLDIR)/elmutil.h
  2020.   elmalias.o:    $(INCLDIR)/elmutil.h $(INCLDIR)/s_elmalias.h
  2021.   fastmail.o:    $(INCLDIR)/patchlevel.h $(INCLDIR)/elmutil.h $(INCLDIR)/s_fastmail.h
  2022.   from.o:        $(INCLDIR)/elmutil.h $(INCLDIR)/s_from.h
  2023. --- 327,332 ----
  2024. ***************
  2025. *** 369,387 ****
  2026.               -$(RM) $@.old
  2027.               $(CP) $? $@
  2028.               $(CHMOD) a+x $@
  2029. - $(DEST)/arepdaemon:    $(BIN)/arepdaemon
  2030. -             -$(MV) $@ $@.old
  2031. -             -$(RM) $@.old
  2032. -             $(CP) $? $@
  2033. -             $(CHMOD) a+x $@
  2034. - $(DEST)/autoreply:    $(BIN)/autoreply
  2035. -             -$(MV) $@ $@.old
  2036. -             -$(RM) $@.old
  2037. -             $(CP) $? $@
  2038. -             $(CHMOD) a+x $@
  2039. -             $(CHMOD) u+s $@
  2040.   
  2041.   $(DEST)/checkalias:    $(BIN)/checkalias
  2042.               -$(MV) $@ $@.old
  2043. --- 341,346 ----
  2044.  
  2045. Index: utils/elmalias.c
  2046. Prereq: 5.8
  2047. *** ../elm2.4/utils/elmalias.c    Sun Sep 26 22:15:08 1993
  2048. --- utils/elmalias.c    Mon May 30 12:31:58 1994
  2049. ***************
  2050. *** 1,8 ****
  2051.   
  2052. ! static char rcsid[] = "@(#)$Id: elmalias.c,v 5.8 1993/09/27 01:05:37 syd Exp $";
  2053.   
  2054.   /*******************************************************************************
  2055. !  *  The Elm Mail System  -  $Revision: 5.8 $
  2056.    *
  2057.    *             Copyright (c) 1988-1992 USENET Community Trust
  2058.    *             Copyright (c) 1986,1987 Dave Taylor
  2059. --- 1,8 ----
  2060.   
  2061. ! static char rcsid[] = "@(#)$Id: elmalias.c,v 5.9 1994/05/30 16:31:40 syd Exp $";
  2062.   
  2063.   /*******************************************************************************
  2064. !  *  The Elm Mail System  -  $Revision: 5.9 $
  2065.    *
  2066.    *             Copyright (c) 1988-1992 USENET Community Trust
  2067.    *             Copyright (c) 1986,1987 Dave Taylor
  2068. ***************
  2069. *** 14,19 ****
  2070. --- 14,23 ----
  2071.    *
  2072.    *******************************************************************************
  2073.    * $Log: elmalias.c,v $
  2074. +  * Revision 5.9  1994/05/30  16:31:40  syd
  2075. +  * make getpwuid dependent on ANSI_C not posix flag
  2076. +  * From: Syd
  2077. +  *
  2078.    * Revision 5.8  1993/09/27  01:05:37  syd
  2079.    * Eliminate warning about redeclaring getpwuid().
  2080.    * From: riacs!rutgers!tscs.tscs.com!fin!chip (Chip Salzenberg)
  2081. ***************
  2082. *** 108,114 ****
  2083.   #include <pwd.h>
  2084.   
  2085.   char *getenv();
  2086. ! #ifndef    _POSIX_SOURCE
  2087.   struct passwd *getpwuid();
  2088.   #endif
  2089.   
  2090. --- 112,118 ----
  2091.   #include <pwd.h>
  2092.   
  2093.   char *getenv();
  2094. ! #ifndef    ANSI_C
  2095.   struct passwd *getpwuid();
  2096.   #endif
  2097.   
  2098.  
  2099. Index: utils/fastmail.c
  2100. Prereq: 5.8
  2101. *** ../elm2.4/utils/fastmail.c    Sun Sep 26 22:15:08 1993
  2102. --- utils/fastmail.c    Fri Mar 11 15:55:25 1994
  2103. ***************
  2104. *** 1,8 ****
  2105.   
  2106. ! static char rcsid[] = "@(#)$Id: fastmail.c,v 5.8 1993/07/20 02:46:36 syd Exp $";
  2107.   
  2108.   /*******************************************************************************
  2109. !  *  The Elm Mail System  -  $Revision: 5.8 $   $State: Exp $
  2110.    *
  2111.    *             Copyright (c) 1988-1992 USENET Community Trust
  2112.    *             Copyright (c) 1986,1987 Dave Taylor
  2113. --- 1,8 ----
  2114.   
  2115. ! static char rcsid[] = "@(#)$Id: fastmail.c,v 5.9 1994/03/11 20:55:23 syd Exp $";
  2116.   
  2117.   /*******************************************************************************
  2118. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  2119.    *
  2120.    *             Copyright (c) 1988-1992 USENET Community Trust
  2121.    *             Copyright (c) 1986,1987 Dave Taylor
  2122. ***************
  2123. *** 14,19 ****
  2124. --- 14,33 ----
  2125.    *
  2126.    *******************************************************************************
  2127.    * $Log: fastmail.c,v $
  2128. +  * Revision 5.9  1994/03/11  20:55:23  syd
  2129. +  * Replaced the get_tz_mins() routine in lib/get_tz.c with a portable
  2130. +  * version that requires no configuration.  Rewrote the test case in
  2131. +  * lib/get_tz.c, and also wrote in support to simplify configuration
  2132. +  * tests.  Dropped TZMINS_USE_XXXX configuration parameter.  Simplified
  2133. +  * timezone determination in Configure.  The new get_tz_mins() introduces
  2134. +  * two side effects.  First it steps on the static data returned by
  2135. +  * localtime().  Second, it uses a routine in lib/date_util.c, which
  2136. +  * requires debug initializations.  Rewrote get_arpa_date() to work around
  2137. +  * the first issue.  Rather than doing the same for lib/strftime.c, just
  2138. +  * removed the timezone stuff with a conditional compile.  Elm does not
  2139. +  * use it.  Added debugging initializations to util/fastmail.c.
  2140. +  * From: chip@chinacat.unicom.com (Chip Rosenthal)
  2141. +  *
  2142.    * Revision 5.8  1993/07/20  02:46:36  syd
  2143.    * In fastmail, if environment variable $REPLYTO is set, use it as
  2144.    * default Reply-To.  Also, eliminate unnecessary strlen() calls.
  2145. ***************
  2146. *** 90,95 ****
  2147. --- 104,112 ----
  2148.   char *get_arpa_date();
  2149.   static void usage();
  2150.   
  2151. + int debug = 0;
  2152. + FILE *debugfile = stderr;
  2153.   
  2154.   main(argc, argv)
  2155.   int argc;
  2156. ***************
  2157. *** 105,111 ****
  2158.       char from_addr[SLEN], comments[SLEN], inreplyto[NLEN];
  2159.       char references[SLEN];
  2160.       char *p;
  2161. !     int  c, sendmail_available, debug = 0;
  2162.   
  2163.       elm_msg_cat = catopen("elm2.4", 0);
  2164.   
  2165. --- 122,128 ----
  2166.       char from_addr[SLEN], comments[SLEN], inreplyto[NLEN];
  2167.       char references[SLEN];
  2168.       char *p;
  2169. !     int  c, sendmail_available;
  2170.   
  2171.       elm_msg_cat = catopen("elm2.4", 0);
  2172.   
  2173.  
  2174. Index: utils/from.c
  2175. Prereq: 5.14
  2176. *** ../elm2.4/utils/from.c    Mon May 31 15:36:09 1993
  2177. --- utils/from.c    Mon May 30 12:27:00 1994
  2178. ***************
  2179. *** 1,8 ****
  2180.   
  2181. ! static char rcsid[] = "@(#)$Id: from.c,v 5.14 1993/05/31 19:36:07 syd Exp $";
  2182.   
  2183.   /*******************************************************************************
  2184. !  *  The Elm Mail System  -  $Revision: 5.14 $   $State: Exp $
  2185.    *
  2186.    *             Copyright (c) 1988-1992 USENET Community Trust
  2187.    *             Copyright (c) 1986,1987 Dave Taylor
  2188. --- 1,8 ----
  2189.   
  2190. ! static char rcsid[] = "@(#)$Id: from.c,v 5.15 1994/05/30 16:27:00 syd Exp $";
  2191.   
  2192.   /*******************************************************************************
  2193. !  *  The Elm Mail System  -  $Revision: 5.15 $   $State: Exp $
  2194.    *
  2195.    *             Copyright (c) 1988-1992 USENET Community Trust
  2196.    *             Copyright (c) 1986,1987 Dave Taylor
  2197. ***************
  2198. *** 14,19 ****
  2199. --- 14,25 ----
  2200.    *
  2201.    *******************************************************************************
  2202.    * $Log: from.c,v $
  2203. +  * Revision 5.15  1994/05/30  16:27:00  syd
  2204. +  * In utils/from.c there was a conditionalized declaration of
  2205. +  * getpwuid() which was triggered by the environment being non-
  2206. +  * POSIX instead of non-STDC.
  2207. +  * From: Jukka Antero Ukkonen <ukkonen@csc.fi>
  2208. +  *
  2209.    * Revision 5.14  1993/05/31  19:36:07  syd
  2210.    * Dave Thomas forgot to update the NLS message file when he added the tidy
  2211.    * option to frm.  While I was at it, I did a little cleanup to keep things
  2212. ***************
  2213. *** 157,163 ****
  2214.       int  multiple_files = FALSE, output_files = FALSE;
  2215.       int  user_mailbox = FALSE, no_files, c;
  2216.       struct passwd *pass;
  2217. ! #ifndef    _POSIX_SOURCE
  2218.       struct passwd *getpwuid();
  2219.   #endif
  2220.       int hostlen, domlen;
  2221. --- 163,169 ----
  2222.       int  multiple_files = FALSE, output_files = FALSE;
  2223.       int  user_mailbox = FALSE, no_files, c;
  2224.       struct passwd *pass;
  2225. ! #ifndef    ANSI_C
  2226.       struct passwd *getpwuid();
  2227.   #endif
  2228.       int hostlen, domlen;
  2229.  
  2230. Index: utils/newmail.c
  2231. Prereq: 5.19
  2232. *** ../elm2.4/utils/newmail.c    Sun Sep 26 22:15:09 1993
  2233. --- utils/newmail.c    Mon May 30 12:32:01 1994
  2234. ***************
  2235. *** 1,8 ****
  2236.   
  2237. ! static char rcsid[] = "@(#)$Id: newmail.c,v 5.19 1993/08/03 19:28:39 syd Exp $";
  2238.   
  2239.   /*******************************************************************************
  2240. !  *  The Elm Mail System  -  $Revision: 5.19 $   $State: Exp $
  2241.    *
  2242.    *             Copyright (c) 1988-1992 USENET Community Trust
  2243.    *             Copyright (c) 1986,1987 Dave Taylor
  2244. --- 1,8 ----
  2245.   
  2246. ! static char rcsid[] = "@(#)$Id: newmail.c,v 5.20 1994/05/30 16:31:40 syd Exp $";
  2247.   
  2248.   /*******************************************************************************
  2249. !  *  The Elm Mail System  -  $Revision: 5.20 $   $State: Exp $
  2250.    *
  2251.    *             Copyright (c) 1988-1992 USENET Community Trust
  2252.    *             Copyright (c) 1986,1987 Dave Taylor
  2253. ***************
  2254. *** 14,19 ****
  2255. --- 14,23 ----
  2256.    *
  2257.    *******************************************************************************
  2258.    * $Log: newmail.c,v $
  2259. +  * Revision 5.20  1994/05/30  16:31:40  syd
  2260. +  * make getpwuid dependent on ANSI_C not posix flag
  2261. +  * From: Syd
  2262. +  *
  2263.    * Revision 5.19  1993/08/03  19:28:39  syd
  2264.    * Elm tries to replace the system toupper() and tolower() on current
  2265.    * BSD systems, which is unnecessary.  Even worse, the replacements
  2266. ***************
  2267. *** 270,276 ****
  2268.       register struct folder_struct *cur_folder;
  2269.       int hostlen, domlen;
  2270.       struct passwd *pass;
  2271. ! #ifndef    _POSIX_SOURCE
  2272.       struct passwd *getpwuid();
  2273.   #endif
  2274.   
  2275. --- 274,280 ----
  2276.       register struct folder_struct *cur_folder;
  2277.       int hostlen, domlen;
  2278.       struct passwd *pass;
  2279. ! #ifndef    ANSI_C
  2280.       struct passwd *getpwuid();
  2281.   #endif
  2282.   
  2283.  
  2284. Index: utils/prlong.c
  2285. Prereq: 5.3
  2286. *** ../elm2.4/utils/prlong.c    Sun Sep 26 22:15:09 1993
  2287. --- utils/prlong.c    Mon May 30 19:59:38 1994
  2288. ***************
  2289. *** 1,8 ****
  2290.   
  2291. ! static char rcsid[] = "@(#)$Id: prlong.c,v 5.3 1993/08/03 19:28:39 syd Exp $";
  2292.   
  2293.   /*******************************************************************************
  2294. !  *  The Elm Mail System  -  $Revision: 5.3 $
  2295.    *
  2296.    *             Copyright (c) 1988-1992 USENET Community Trust
  2297.    *             Copyright (c) 1986,1987 Dave Taylor
  2298. --- 1,8 ----
  2299.   
  2300. ! static char rcsid[] = "@(#)$Id: prlong.c,v 5.4 1994/05/30 23:59:24 syd Exp $";
  2301.   
  2302.   /*******************************************************************************
  2303. !  *  The Elm Mail System  -  $Revision: 5.4 $
  2304.    *
  2305.    *             Copyright (c) 1988-1992 USENET Community Trust
  2306.    *             Copyright (c) 1986,1987 Dave Taylor
  2307. ***************
  2308. *** 14,19 ****
  2309. --- 14,23 ----
  2310.    *
  2311.    *******************************************************************************
  2312.    * $Log: prlong.c,v $
  2313. +  * Revision 5.4  1994/05/30  23:59:24  syd
  2314. +  * fix those that need getopt, getopt calls elm_msg_cat
  2315. +  * From: Syd
  2316. +  *
  2317.    * Revision 5.3  1993/08/03  19:28:39  syd
  2318.    * Elm tries to replace the system toupper() and tolower() on current
  2319.    * BSD systems, which is unnecessary.  Even worse, the replacements
  2320. ***************
  2321. *** 73,79 ****
  2322.   
  2323.   
  2324.   #include <stdio.h>
  2325. ! #include "defs.h"
  2326.   
  2327.   #define MAXWID        78    /* default maximum line width        */
  2328.   #define ONE_LDR        ""    /* default leader for first line    */
  2329. --- 77,87 ----
  2330.   
  2331.   
  2332.   #include <stdio.h>
  2333. ! #ifndef GETOPT
  2334. ! # include "elmutil.h"
  2335. ! #else
  2336. ! # include "defs.h"
  2337. ! #endif
  2338.   
  2339.   #define MAXWID        78    /* default maximum line width        */
  2340.   #define ONE_LDR        ""    /* default leader for first line    */
  2341. ***************
  2342. *** 112,117 ****
  2343. --- 120,129 ----
  2344.   
  2345.   #ifdef I_LOCALE
  2346.       setlocale(LC_ALL, "");
  2347. + #endif
  2348. + #ifndef GETOPT
  2349. +     elm_msg_cat = catopen("elm2.4", 0);
  2350.   #endif
  2351.   
  2352.       /*
  2353.  
  2354.